k8s rollout

k8s rollout

image

//查看历史版本
kubectl rollout history
//暂停资源
kubectl rollout pause
//恢复暂停资源
kubectl rollout resume
//查看资源状态
kubectl rollout status
//回滚版本
kubectl rollout undo
//重新部署
kubectl rollout restart

1.1 kubectl rollout history

//查看历史的版本记录,可以指定某个版本还原
rancher kubectl  rollout history deployment/console -n liwench21120601

//查看版本1的记录
kubectl rollout history deployment nginx-test --revision=1

4.1 kubectl rollout status

//查看状态
rancher kubectl  rollout status deployment/java-console -n duyj22051101

5.1 kubectl rollout undo

//还原到上一个版本
kubectl rollout undo deployment/nginx-test

//指定版本
kubectl rollout undo deployment/nginx-test --to-revision=2
posted @ 2022-08-10 11:57  liwenchao1995  阅读(772)  评论(0编辑  收藏  举报