Skip to content

Instantly share code, notes, and snippets.

@waleedsamy
Created July 25, 2017 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waleedsamy/14ab6337222c65de0e3ea6070a340fdb to your computer and use it in GitHub Desktop.
Save waleedsamy/14ab6337222c65de0e3ea6070a340fdb to your computer and use it in GitHub Desktop.
kubernetes rollout command in nutshell
#record revision with clear information
kubectl create -f xDeployment.yaml --record
# interactive command to get the status for a deployment, you can check it's result with $?
kubectl rollout status deploy/x
# show revisions
kubectl rollout history deploy/x
# details about revision 1
kubectl rollout history deploy/x --revision 1
#rollback to to previous version
kubectl rollout undo deploy/x
#rollback to to specific version
kubectl rollout undo deploy/x --to-revision=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment