# 应用升级nginx到1.15
kubectl -n NAMESPACE set image deployment DEPLOYNAME nginx=nginx:1.15
# 查看升级状态
kubectl -n NAMESPACE rollout status deployment DEPLOYNAME
# 查看历史版本
kubectl -n NAMESPACE rollout history deployment DEPLOYNAME
# 回滚,还原到上一个版本
kubectl -n NAMESPACE rollout undo deployment DEPLOYNAME
# 回滚到指定版本
kubectl -n NAMESPACE rollout undo deployment DEPLOYNAME --to-revision=172
# 2 表示版本?
# 弹性伸缩
kubectl -n NAMESPACE scale deployment DEPLOYNAME --replicas=2