What does `kubectl rollout restart` do and when do you use it?
BeginnerScenarioDeployments and rollouts
Answer
Situation read → A ConfigMap changed and the app only reads it at startup.
What I'd do →
kubectl rollout restart deploy/webkubectl rollout status deploy/web- Verify new pods have newer AGE with
kubectl get pods - Prefer a checksum annotation in the pod template (Helm
sha256sum) so config changes trigger rollouts automatically
Why → The command adds a kubectl.kubernetes.io/restartedAt annotation to the pod template, which creates a new ReplicaSet and a normal rolling update.
Interview tip → Note it is zero-downtime when probes and strategy are correct, unlike deleting pods by hand.
More on Deployments and rollouts
You applied a new image tag and the rollout seems stuck at "1 out of 3 new replicas have been updated". What do you check first?BeginnerHow do you roll back a bad release and verify you are back on the previous version?BeginnerA rollout must never reduce capacity below current replicas. How do you configure the strategy?IntermediateYou need a blue/green deployment without a service mesh. How do you do it with plain Kubernetes?IntermediateHow would you do a canary release with only Deployments and a Service?IntermediateWhat is the difference between Recreate and RollingUpdate strategies and when would you pick Recreate?Beginner