Restarting / bringing down pods

MethodDowntimeIn-memory clearedUse when
Delete podMinimalNoQuick restart
Rolling restartNoneNoZero-downtime redeploy
Scale to 0YesYesTesting cold start / persistence
# Scale to 0 (full teardown)
kubectl scale deployment <app> --replicas=0 -n <ns>
kubectl scale deployment <app> --replicas=1 -n <ns>
 
# Delete pod (auto-replaced by K8s)
kubectl delete pod <pod-name> -n <ns>
 
# Rolling restart
kubectl rollout restart deployment/<app> -n <ns>

Watch pod status

kubectl get pods -n <ns> -w
kubectl logs -f deployment/<app> -n <ns>