Containers · Kubernetes Workloads
Deployments and Rolling Updates
Cheat sheet · https://pcornel.dk/topic.php?topic=6144
Answer
A Deployment manages ReplicaSets for stateless pods and performs rolling updates (maxSurge/maxUnavailable) with rollback history.
Remember
A rollout waits for readiness — broken probes or images stall it. kubectl rollout undo rolls back. Set progressDeadlineSeconds.
First checks
kubectl rollout status deploy/<d>— first check for this topickubectl get pods -o wide— pods, status, node, IPkubectl describe pod <pod>— events and conditionskubectl logs <pod> [-c <c>] [--previous]— container logs (incl. previous crash)kubectl get events --sort-by=.lastTimestamp— recent cluster events
Commands
kubectl rollout undo deploy/webkubectl rollout restart deploy/web
Verify in this order
new template → new ReplicaSet → scale up/down per strategy → old RS scaled to 0
Where it usually breaks
Changing only a ConfigMap does not trigger a rollout.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6144