Interview Prep/DevSecOps/Container and IaC Security

How do you scan Helm charts and Kubernetes manifests before deployment?

IntermediateScenarioContainer and IaC Security
Answer

Situation read → Misconfigurations like privileged pods and missing limits are easiest to catch before they hit the cluster.

What I'd do →

  1. Render the chart: helm template myapp ./chart -f values-prod.yaml > rendered.yaml.
  2. Scan: trivy config rendered.yaml, kubesec scan, or checkov -f rendered.yaml.
  3. Validate schema with kubeconform -strict.
  4. Evaluate custom rules with conftest or Kyverno CLI (kyverno apply policy.yaml --resource rendered.yaml).
  5. Run on every PR and block on high severity.

Why → Scanning rendered output tests what is actually applied, not just templates.

Interview tip → Scan with the production values file; defaults can hide problems.

All DevSecOps questions Roadmap: Policy as code

More on Container and IaC Security