Docker Orchestration by Smith Randall

Docker Orchestration by Smith Randall

Author:Smith, Randall [Smith, Randall]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2017-01-24T05:00:00+00:00


Rolling back an update

You may find that, after the update, something has gone horribly wrong, and that the update needs to be rolled back. Fortunately, there is a very convenient undo command:

$ kubectl rollout undo deploy/update-deploy deployment "update-deploy" rolled back

Without options, the command will revert the named deployment to the previous one in the history. The --to-revision=N flag will revert the deployment to revision N from the history.

Deleting a deployment

Remember that the job of a deployment is to ensure that the required number of pods are running. Trying to delete a deployment by deleting the pods is like Sisyphus trying to roll a rock up a hill. Kubernetes will keep recreating the pods as fast as they are deleted. When a deployment is no longer needed, it can be deleted with kubectl delete deployment. Make sure that you want to proceed because this will delete all running pods which are part of the deployment:

$ kubectl delete deployment web deployment "web" deleted

It is possible to delete a deployment while leaving the pods running, using the --cascade=false flag. The leftover pods will have to be deleted manually.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.