Debugging and Troubleshooting

1. Using Debug Mode

FlagEffect
--debugVerbose output including computed values + stack traces

2. Generating Templates Locally

Example: Render to file

helm template api ./chart -f values-prod.yaml > rendered.yaml

3. Performing Dry Run

TypeDifference
--dry-run=clientLocal render only
--dry-run=serverSends to API server (admission webhooks run)

4. Viewing Rendered Manifests

CommandOutput
helm get manifest <release>What's currently installed
helm template ...What would be installed
diff <(helm get manifest x) <(helm template x ./chart)Manual diff

5. Checking Release Status

Example: Detailed status

helm status api -n web --show-resources --show-desc

6. Viewing Release History

CommandUse
helm history apiList revisions
helm get all api --revision 3Inspect older revision

7. Inspecting Hook Execution

Example: View hook pods/jobs

kubectl get pods -n web -l owner=helm
helm get hooks api

8. Checking Resource Events

CommandUse
kubectl describe pod <name>Events at end of output
kubectl get events -n web --sort-by=.lastTimestampRecent cluster events

9. Validating Current Values

Example: Diff values vs file

helm get values api -o yaml > current.yaml
diff current.yaml values-prod.yaml

10. Using Verbose Output

FlagEffect
-v=4 ... -v=9Kubernetes client log verbosity
HELM_DEBUG=truePermanent debug mode

11. Troubleshooting Failed Upgrades

SymptomResolution
Stuck pending-upgradePatch release secret status to deployed, then re-run
Immutable field changesUse --force or delete + reinstall single resource
Quota exceededIncrease namespace quota or scale down replicas first
Image pull errorCheck pull secret, registry credentials
Webhook failureCheck admission controllers (OPA/Kyverno/cert-manager)

12. Debugging Template Rendering

Example: Pinpoint failure

helm template ./chart --debug 2>&1 | less
helm template ./chart --show-only templates/deployment.yaml
Note: The helm-diff plugin provides clean upgrade previews: helm diff upgrade api ./chart -f values.yaml.