Skip to main content

🔄 Restart

Restarting an application is useful when you changed a configuration (ConfigMap or Secret) or when it froze. Kubernetes does this without taking the service down: it creates new pods and only then removes the old ones.

info

Restart is done with kubectl. The Nuvion Panel does not have this feature.


🚀 Before you start​

  • Have cluster access configured (see Cluster Access).
  • Have the web-deploy Deployment from the Deploy page.

🚀 1. See the pods before​

kubectl get pods -l app=web-deploy

Note the names and the AGE column.

🚀 2. Restart the Deployment​

kubectl rollout restart deployment/web-deploy

Expected output: deployment.apps/web-deploy restarted

🚀 3. Follow along​

kubectl rollout status deployment/web-deploy
kubectl get pods -l app=web-deploy

The pods have new names and a low AGE. The final status is successfully rolled out.

🚀 4. Restart a single pod​

When only one pod has a problem:

kubectl delete pod POD-NAME

The Deployment creates a new pod in its place.

warning

This only works for pods created by a Deployment. A pod created on its own (with kubectl run) does not come back after being deleted.

🚀 5. Restart other workload types​

kubectl rollout restart statefulset/NAME
kubectl rollout restart daemonset/NAME

💡 When to use it after changing configuration​

Environment variables coming from a ConfigMap or Secret are only read when the pod starts. After changing the value, run rollout restart so the application sees the change.

✅ How to know it worked​

kubectl rollout status ends with successfully rolled out, and the pods have new names and AGE.

❗ Common problems​

SymptomCauseSolution
rollout status never finishesThe new pod does not become readySee kubectl describe pod and Events
New pods in PendingNo resources on the nodesSee Scale
Deleted pod does not come backIt does not belong to a DeploymentRecreate with kubectl apply

➡️ Next step: Rollout

🧠 Questions?​

Talk to our SaveinCloud technical support team!