helm lint: Command Reference for CI/CD
Validate a chart before it ever reaches a cluster.
helm lint examines a chart for structural problems and best-practice violations. It is the cheapest first gate in a chart pipeline, catching errors before any render or deploy. This reference covers its flags and CI use.
Common flags and usage
- lint <chart-dir>: check a chart for issues
- --strict: treat warnings as errors (fail the build on warnings)
- -f values.yaml / --set k=v: lint with specific values
- --quiet: only surface errors, suppress info messages
- Exits non-zero when it finds errors (or warnings under --strict)
Example
helm lint ./charts/web --strict \
-f ./charts/web/values-prod.yamlIn CI
Run lint --strict as an early PR gate so chart problems fail fast and cheap, before helm template or any deploy. Lint with the same values file the deploy uses so value-dependent template errors surface here rather than at install time.
Using this in CI
A runner has no kubeconfig, no cached context, and no interactive auth. Every kubectl invocation in CI needs the context supplied explicitly, and most confusing CI failures here are the command running against the wrong cluster or no cluster at all.
# never rely on the ambient context on a runner
kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pods
# confirm what you are actually connected to before mutating anything
kubectl config current-context
kubectl cluster-info
# fail fast instead of hanging on an unreachable API server
kubectl --request-timeout=30s get nodesKey takeaways
- lint is the cheapest chart gate; run it first in the pipeline.
- --strict turns warnings into build failures.
- Lint with the deploy values file to catch value-dependent errors early.