deployment

直接修改deployment镜像

kubectl set image deployment/nginx-deployment nginx=nginx:1.91

回滚deployment变更

kubectl rollout undo deployment/nginx-deployment

查询deployment信息

kubectl describe deployment nginx-deployment

deployment变更历史查询

kubectl rollout history deployment/nginx-deployment

查看deployment变更历史中某个版本(版本号是变更历史查询到的版本号)的细节

kubectl rollout history deployment/nginx-deployment --revision=2

回滚deployment到某个版本号,前面两个命令可以查看历史版本信息

kubectl rollout undo deployment/nginx-deployment --to-revision=6

不要触发deployment的自动滚动更新功能:

kubectl rollout pause deployment/nginx-deployment

恢复deployment的自动滚动更新功能

kubectl rollout resume deploy/nginx-deployment

副本

查询副本

kubectl get rs