Interview Prep/Kubernetes/Upgrades, etcd, disaster recovery and incidents

How would you perform a zero-downtime migration of a stateful database from a VM into Kubernetes?

AdvancedScenarioUpgrades, etcd, disaster recovery and incidents
Answer

Situation read → Move PostgreSQL to a CloudNativePG cluster.

What I'd do →

  1. Set up the operator and a replica cluster
  2. Configure logical or physical replication from the VM
  3. Verify lag and consistency
  4. Cut over during a short write freeze: promote and switch app connection strings
  5. Keep the VM as fallback until validated

Why → Replication allows a small controlled cutover window.

Interview tip → Say you rehearse and have a rollback plan.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Upgrades, etcd, disaster recovery and incidents