Interview › Kubernetes, Docker, Helm & Podman
How do you roll back a Deployment, and how does Kubernetes track revisions?
Kubernetes, Docker, Helm & Podman · Basic level
Answer
I roll back a Deployment with kubectl rollout undo, optionally targeting a revision. Kubernetes tracks rollout history through Deployment revisions and the ReplicaSets it created, so rollback usually means scaling an earlier ReplicaSet back up.
Technical explanation
Rollback requires previous ReplicaSets to still exist; revisionHistoryLimit controls how much history is retained.
Rollback does not undo external changes such as database migrations unless those are separately versioned and reversible.
Kubernetes resources are declarative API objects; controllers continuously drive actual state toward spec.
The practical interview angle is to connect the concept to reliability: scheduling, healing, scaling, rollout safety, and clear ownership.
Use kubectl get, describe, explain, and -o yaml to move from high-level view to exact spec/status details.
Hands-on example
1. Create a local lab with kind or minikube, then use it to demonstrate: roll back a bad Deployment image and inspect rollout history.
2. Run kubectl get nodes -o wide, kubectl get pods -A, kubectl describe, and kubectl get -o yaml to connect the concept to actual cluster state.
3. Make one intentional change, such as a label change, image update, or replica change, and watch how the control plane reconciles it.
4. Capture the command output and convert it into an interview story: desired state, observed state, failure mode, and fix.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Kubernetes, Docker, Helm & Podman interview questions
- How does a Deployment perform a rolling update, and how do maxSurge and maxUnavailable work?
- How does a Service select its Pods, and what happens if labels do not match?
- What is a Pod, and why does Kubernetes schedule Pods rather than containers?
- What is the difference between a liveness, readiness, and startup probe?
- Explain the Kubernetes control plane components (API server, etcd, scheduler, controller manager).
- How do you encrypt Kubernetes Secrets at rest?
- What is a ResourceQuota and a LimitRange?
- What is the difference between a StatefulSet and a Deployment?