Deployment升级与回滚
kubectl set image deployment/nginx-deployment nginx=nginx:1.9.1
kubectl set resources deployment/nginx-deployment -c=nginx
--limits=cpu=200m,memory=512Mi
#暂停
kubectl rollout pause deployment/nginx-deployment
#恢复
kubectl rollout resume deployment/nginx-deployment
#查询升级状态
kubectl rollout status deployment/nginx-deployment
#查询升级历史
kubectl rollout histroy deploy/nginx-deployment
kubectl rollout histroy deploy/nginx-deployment --revision=2
#回滚
kubectl rollout undo deployment/nginx-deployment --to-revision=2
应用弹性升级
kubectl scale deployment nginx-deployment --replicas=10
# 对接heapster和HPA联动后 这个必须时集群支持   不支持是不是有这个效果的。
kubectl autoscale deployment nginx-deployment --min=10 --max=15 --cpu-percent=80
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐