38 k8s 镜像更新和回滚
k8s 镜像更新和回滚
# 执行更新nginx操作
[root@k8s-master01 ~]# kubectl set image deploy nginx nginx=nginx:787977da --record
# 查看历史版本
[root@k8s-master01 ~]# kubectl rollout history deploy nginx
# 回滚到上一个版本
[root@k8s-master01 ~]# kubectl rollout undo deploy nginx
[root@k8s-master01 ~]# kubectl get po
[root@k8s-master01 ~]# kubectl get deploy nginx -oyaml | grep nginx