Interview Prep/Helm/Hooks, Tests & Validation

How do you dry-run an upgrade against the live cluster, including admission webhooks?

AdvancedConceptHooks, Tests & Validation
Answer
helm upgrade --install shop ./shop -n shop -f values-prod.yaml --dry-run=server

The API server receives every object with dryRun=All, so OPA Gatekeeper or Kyverno policies, the OpenAPI schema and immutable-field checks all run, and nothing is persisted. Hooks are not executed. Combined with helm diff, this catches most failures before a real deploy.

All Helm questions Roadmap: Helm

More on Hooks, Tests & Validation