Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
The Kubernetes Book

You're reading from   The Kubernetes Book The fastest way to get your head around Kubernetes

Arrow left icon
Product type Paperback
Published in Jun 2019
Publisher
ISBN-13 9781838984380
Length 228 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Nigel Poulton Nigel Poulton
Author Profile Icon Nigel Poulton
Nigel Poulton
Pushkar Joglekar Pushkar Joglekar
Author Profile Icon Pushkar Joglekar
Pushkar Joglekar
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. Chapter 1 FREE CHAPTER
2. Kubernetes Primer 3. Chapter 2
4. Kubernetes Principles of Operation 5. Chapter 3
6. Installing Kubernetes 7. Chapter 4
8. Working with Pods 9. Chapter 5
10. Kubernetes Deployments 11. Chapter 6
12. Kubernetes Services 13. Chapter 7
14. Kubernetes Storage 15. Chapter 8
16. Other Important Kubernetes Stuff 17. Chapter 9
18. Threat Modeling Kubernetes 19. Chapter 10
20. Real-World Kubernetes Security 21. Chapter 11
22. What Next

How to Perform a Rollback

A moment ago, we used kubectl apply to perform a rolling update on a Deployment. We used the --record flag so that Kubernetes would maintain a documented revision history of the Deployment. The following kubectl rollout history command shows the Deployment with two revisions.

$ kubectl rollout history deployment hello-deploy
deployment.apps/hello-deploy
REVISION  CHANGE-CAUSE
1         <none>
2         kubectl apply --filename-deploy.yml --record=true

Revision 1 was the initial deployment that used the latest image tag. Revision 2 is the rolling update we just performed, and we can see that the command we used to invoke the update has been recorded in the object's history. This is only there because we used the --record flag as part of the command to invoke the update. This might be a good reason for you to use the --record flag.

Earlier in the chapter, we said that updating a Deployment creates a new ReplicaSet, and that any previous ReplicaSets...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images