Interview Prep/Kubernetes/Configuration, Secrets and storage

How do you pass a different config per environment with one set of manifests?

IntermediateScenarioConfiguration, Secrets and storage
Answer

Situation read → Dev, staging and prod differ only in replicas, hostnames and limits.

What I'd do →

  1. Use Kustomize with base/ and overlays/dev|staging|prod
  2. Patch values with patches and configMapGenerator
  3. Or Helm with one values-<env>.yaml per environment
  4. Render with kustomize build overlays/prod or helm template in CI
  5. Validate with kubeconform

Why → Base plus overlays keeps duplication low and differences reviewable.

Interview tip → Say you never copy-paste manifests per environment.

All Kubernetes questions Roadmap: Kubernetes core

More on Configuration, Secrets and storage