What rollback options exist in Kubernetes and Helm?
Quick Answer
For a Deployment, kubectl rollout undo reverts to the previous revision (or --to-revision=N). For Helm releases, helm rollback <release> <revision> reverts the whole release. In GitOps, you roll back by reverting the Git commit.
Detailed Answer
Kubernetes keeps a bounded Deployment revision history, so rollback is fast and probe-gated like any rollout; helm history shows release revisions to target. The right mechanism depends on how you deploy: kubectl for raw manifests, helm for charts, git revert for Argo/Flux. Backward-compatible schema/config changes are what keep rollbacks safe.
Code Example
kubectl rollout undo deployment/web helm rollback web 3
Interview Tip
Match the rollback method to the deploy method (kubectl vs helm vs git revert) — using the wrong one in a GitOps setup gets reverted by the controller.