Linting and Validating Charts

1. Linting Chart Templates

Example: Run lint

helm lint ./chart
helm lint ./chart -f values-prod.yaml

2. Checking Chart Structure

CheckDetail
Chart.yaml present + validRequired fields filled
values.yaml parsesValid YAML
Templates renderNo syntax errors
Schema checkIf values.schema.json present
Icon URL reachableHTTPS recommended

3. Validating Chart.yaml

FieldLint check
apiVersionMust be v2 (Helm 3)
nameDNS-1123 label
versionSemVer compliant
iconHTTPS URL if present

4. Validating Template Syntax

Example: Render + parse

helm template ./chart | kubectl apply --dry-run=client -f -

5. Using Strict Linting

FlagEffect
--strictTreat warnings as errors (exit non-zero)
--quietPrint only errors

6. Checking Values Schema

Example: Schema-enforced lint

helm lint ./chart -f bad-values.yaml
# Error: values don't meet the specifications of the schema(s) in the following chart(s)

7. Validating Kubernetes Resources

ToolPurpose
kubeconformOffline schema validation against K8s OpenAPI
kubevalOlder alternative (archived)
kubectl apply --dry-run=serverLive admission webhook validation
polaris / kube-linterBest-practices linting

8. Generating Dry-Run Output

CommandUse
helm install x ./chart --dry-run --debugPre-install validation
helm upgrade x ./chart --dry-runDiff intent before applying
--dry-run=serverRun through admission controllers

9. Using Template Command

Example: Render without cluster

helm template myrelease ./chart \
  -f values.yaml \
  --namespace web \
  --api-versions monitoring.coreos.com/v1 \
  --kube-version 1.29.0 \
  --show-only templates/deployment.yaml

10. Debugging Template Rendering

FlagEffect
--debugPrint computed values + stack trace on error
--disable-openapi-validationSkip OpenAPI schema check
--show-only pathRender single template file

11. Validating Dependencies

CommandUse
helm dependency listVerify all dependencies resolved
helm dependency updateRe-download per Chart.yaml
helm dependency buildLock-file-driven install