Q: How do you handle configuration that differs between environments (dev, staging, prod) in Kubernetes?
Two main approaches:
#Kubernetes #Advanced Scenarios #L2 #Container Orchestration #K8s #Ingress
🎙️ Candidate Opening & Architectural Context
""Kubernetes is a declarative desired state system; understanding the reconciliation loop is how you diagnose this quickly. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix.""
Advertisement
🛠️ Production Runbook & Step-by-Step Resolution
1️⃣
Initial Diagnostics & Root Cause Analysis
Two main approaches:
- Kustomize — base manifests + environment-specific overlays. Overlay patches change values (image tags, resource limits, replica counts) per environment without duplicating YAML.
- Helm — use different
values.yamlfiles per environment.helm install -f values.prod.yamlapplies prod-specific values. - Use same manifests for all environments (promotes "production parity").
2️⃣
Remediation & Permanent Safeguards
Best practice:
- Only override what genuinely differs: image tags, replica counts, resource limits, ingress hostnames, secret references.
- Don't use separate Deployment files per environment — too much duplication and drift.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Kustomize — base manifests + environment-specific overlays. Overlay patches change values (image tags, resource limits, replica co."
⚡ 60-Second Elevator Pitch Talking Points
- Kustomize — base manifests + environment-specific overlays. Overlay patches change values (image ...
- Helm — use different values.yaml files per environment. helm install -f values.prod.yaml applies ...
- Use same manifests for all environments (promotes "production parity").
Advertisement