重启pod的三种方法

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

你可能感兴趣的:(重启pod的三种方法)