kubectl控制ReplicaSet更新状态

  sre

5ff6defe8688c2979.jpg_fo742.jpg

# 列出默认命名空间下的所有Deployment
kubectl get deploy

# 通过定义文件更新Deployment
kubectl apply -f test.yaml

# 监控"test"这个Deployment的状态更新
kubectl rollout status deploy/test

# 暂停"test"这个Deployment的更新流程:
kubectl rollout pause deploy/test

# 恢复"test"这个Deployment的更新流程:
kubectl rollout resume deploy/test

# 查看"test"这个Deployment的更新历史:
kubectl rollout history deploy/test

# 回退test最近的更新
kubectl rollout undo deploy/test

# 把test这个Deployment回滚到指定版本
kubectl rollout undo deploy/test --to-revision=1

LEAVE A COMMENT

Captcha Code