βΈοΈDeployment
Describe about What is Deployment ?
It is similar to ReplicaSet
, the different thing is we can update the new version of pod by using Deployment
There are 2 mechanism to update pod version:
Recreate
Rolling Update
Recreate = It will destroy all of the existing pod and recreate (has downtime)
Rolling Update (default) = It will create new pod with new version after that it will down the existing pod this process is doing 1 by 1 until remove all of existing pod (no down time) CheatSheet Command
Get Deployment :
kubectl get deployment
Create Deployment:
kubectl create deployment <deployment_name> --replicas=<amount_of_replica> --image=<image_name>
Check the apiVersion of the template:
kubectl explain deployment
Execute command from file
kubectl apply -f <file_name>.yaml
Check status of rollout deployment:
kubectl rollout status deployment/<depoyment_name>
Check history of rollout deployment:
kubectl rollout history deployment/<depoyment_name>
Undo rollout deployment:
kubectl rollout undo deployment/<depoyment_name>
Last updated