A developer accidentally deleted a Kubernetes namespace in production.
BeginnerScenarioBackup & Disaster Recovery
Answer
Situation read → Workloads, Services, ConfigMaps, Secrets and PVCs are gone. Recovery depends on GitOps and backups.
What I'd do →
- Declare an incident.
- Recreate resources from Git (Argo CD or Flux re-sync).
- Restore persistent data with Velero or from database backups (PV reclaim policy
Retainmay have kept volumes). - Restore Secrets from the secret manager (External Secrets Operator) or Velero.
- Postmortem: restrict delete permissions with RBAC, use admission policies to block namespace deletion for protected namespaces, require break-glass for production deletes.
Why → GitOps plus backups makes recovery repeatable; RBAC prevents recurrence.
Interview tip → Mention Retain reclaim policy and admission control.
More on Backup & Disaster Recovery
You discover nobody has tested a database restore in two years.BeginnerThe business asks for RPO 0 and RTO 5 minutes for every service.IntermediateRansomware encrypted your primary database and the backups in the same account.AdvancedPlan a DR drill for a Kubernetes-based application with a PostgreSQL database.IntermediateYour restore takes 6 hours but the RTO is 1 hour.IntermediateHow do you prove to auditors that your DR plan works?Intermediate