Interview Kubernetes, Docker, Helm & Podman

How would you back up and restore an etcd cluster?

Kubernetes, Docker, Helm & Podman · Intermediate level

Answer

For etcd backup, I take a snapshot with etcdctl or the managed provider mechanism, store it securely, and regularly test restore in a non-production cluster. A backup is not trusted until a restore has been rehearsed.

Technical explanation

A consistent etcd restore usually recreates a cluster from the snapshot rather than merging arbitrary old state into a live cluster.

Snapshot encryption, access control, retention, and restore runbooks are as important as the snapshot command.

Kubernetes internals follow a watch-and-reconcile model over API objects stored in etcd.

Extending Kubernetes safely requires schema validation, idempotent controllers, finalizers, ownership, and observable status conditions.

Backup and restore procedures are part of the control-plane design, not an afterthought.

Hands-on example

1. Use a disposable kubeadm or kind-based lab for this exercise: take an etcd snapshot and restore it in a throwaway cluster. Do not practice destructive control-plane work on production.

2. Inspect API objects and controller behavior with kubectl get -w, events, status fields, and logs from the relevant controller.

3. For backup/restore topics, create a snapshot, restore into a separate environment, and verify objects and workloads after recovery.

4. Document the failure scenario, recovery steps, and validation commands.

Preparing for an interview?

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

← All Kubernetes, Docker, Helm & Podman questions