1.Rolling Restart
kubectl rollout restart deployment [deployment_name]
2.Using Environment Variables
kubectl set env deployment [deployment_name] DEPLOY_DATE="$(date)"
3: Scaling the Number of Replicas
kubectl scale deployment [deployment_name] --replicas=0
kubectl scale deployment [deployment_name] --replicas=1
网友评论