1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| kubectl create deployment nginx --image=nginx:1.16 --replicas=3
kubectl set image deployment/nginx nginx=nginx:1.17 --record
[master root ~] kubernetes.io/change-cause: kubectl set image deployment/nginx nginx=nginx:1.17 --record=true Image: nginx:1.17
[master root ~] NAME DESIRED CURRENT READY AGE CONTAINERS IMAGES SELECTOR nginx-6d4cf56db6 0 0 0 11m nginx nginx:1.16 app=nginx,pod-template-hash=6d4cf56db6 nginx-db749865c 3 3 3 4m30s nginx nginx:1.17 app=nginx,pod-template-hash=db749865c
[master root ~] deployment.apps/nginx REVISION CHANGE-CAUSE 1 <none> 2 kubectl set image deployment/nginx nginx=nginx:1.17 --record=true
[master root ~] deployment.apps/nginx rolled back Waiting for deployment "nginx" rollout to finish: 1 out of 3 new replicas have been updated... Waiting for deployment "nginx" rollout to finish: 1 out of 3 new replicas have been updated... Waiting for deployment "nginx" rollout to finish: 2 out of 3 new replicas have been updated... Waiting for deployment "nginx" rollout to finish: 2 out of 3 new replicas have been updated... Waiting for deployment "nginx" rollout to finish: 1 old replicas are pending termination... Waiting for deployment "nginx" rollout to finish: 1 old replicas are pending termination... deployment "nginx" successfully rolled out
[master root ~] Image: nginx:1.16
|