Create production-ready Helm charts for Kubernetes application deployment with templating, values management, chart dependencies, hooks, and testing. Covers chart structure, Go template syntax, values.yaml design, chart repositories, versioning, and best practices for maintainable and reusable charts. Use when packaging a Kubernetes application for repeatable deployments, parameterizing manifests for multiple environments, managing complex multi-component applications with dependencies, or standardizing deployment practices with versioned rollback capability across teams.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
The command stays on one line. Scroll horizontally to inspect it before copying.
Prefer a local copy? Download the files currently available to SkillsMP.
Showing SKILL.md
SKILL.md
Source instructions · Read-only preview
name
write-helm-chart
locale
caveman-ultra
source_locale
en
source_commit
82c77053
translator
Julius Brussee homage — caveman
translation_date
2026-04-19
description
Create production-ready Helm charts for Kubernetes application deployment with templating, values management, chart dependencies, hooks, and testing. Covers chart structure, Go template syntax, values.yaml design, chart repositories, versioning, and best practices for maintainable and reusable charts. Use when packaging a Kubernetes application for repeatable deployments, parameterizing manifests for multiple environments, managing complex multi-component applications with dependencies, or standardizing deployment practices with versioned rollback capability across teams.
Expected: Chart directory structure created with all required files. Chart.yaml contains complete metadata. Dependencies listed if applicable. Chart validates: helm lint my-app.
On failure:
Check YAML syntax in Chart.yaml: helm lint my-app
Verify apiVersion is v2 (v1 deprecated)
Ensure version follows SemVer (x.y.z)
Check dependency repository URLs are reachable
Use helm show chart <chart> to inspect existing charts for examples
Step 2: Design values.yaml Structure
Create well-organized values.yaml with sensible defaults and documentation.
Create comprehensive values.yaml:
# values.yaml (excerpt - see EXAMPLES.md for complete structure)global:imageRegistry:""image:registry:docker.iorepository:mycompany/my-apptag:""replicaCount:3service:type:ClusterIPport:80resources:limits: {cpu:1000m, memory:512Mi}
requests: {cpu:100m, memory:128Mi}
# ... (ingress, autoscaling, probes, persistence - see EXAMPLES.md)
See EXAMPLES.md for the complete values.yaml structure and values.schema.json
Expected: values.yaml organized logically with sections. All values documented with comments. Sensible defaults that work out-of-box. Schema validates value types. No hardcoded environment-specific values.
On failure:
Validate YAML syntax: yamllint values.yaml
Check schema validation: helm lint my-app
Review against Helm best practices: helm lint --strict my-app
Ensure all template references have corresponding values
Test with minimal values: helm template my-app --set image.repository=test
Step 3: Create Template Files with Go Templating
Write Kubernetes resource templates using Go template syntax and Helm functions.
# templates/ingress.yaml (excerpt)
{{-if.Values.ingress.enabled-}}
apiVersion:networking.k8s.io/v1kind:Ingressmetadata:name: {{ include"my-app.fullname". }}
# ... (see EXAMPLES.md for complete ingress and HPA templates)
See EXAMPLES.md for complete _helpers.tpl and conditional templates
Expected: Templates generate valid Kubernetes YAML. Conditionals work correctly (if/with). Helper functions produce expected output. Resources properly labeled and named. No hardcoded values in templates.
On failure:
Test template rendering: helm template my-app
Check for template syntax errors: helm lint my-app
Validate Go template syntax carefully (dashes, spaces matter)
Use helm template --debug for detailed error messages
Test with different values files: helm template my-app -f values-prod.yaml
Test hooks independently: helm install --dry-run --debug my-app
Step 5: Test and Package Chart
Validate chart, run tests, and package for distribution.
Lint and validate chart:
# Basic linting
helm lint my-app
# Strict linting
helm lint --strict my-app
# Test template rendering
helm template my-app
# Test with custom values
helm template my-app -f values-prod.yaml
# Validate against Kubernetes cluster (dry-run)
helm install my-app my-app --dry-run --debug
# Check for deprecated API versions
helm install my-app my-app --dry-run | kubectl apply --dry-run=server -f -
Create chart tests:
# Run Helm tests
helm install my-app my-app -n test --create-namespace
helm test my-app -n test
kubectl logs -n test -l "helm.sh/hook=test" --tail=-1
# See EXAMPLES.md for complete test script (test-chart.sh)
Package chart:
# Update dependencies first
helm dependency update my-app
# Package chart
helm package my-app
# Creates: my-app-0.1.0.tgz# Verify package
helm verify my-app-0.1.0.tgz
# Generate index for repository
helm repo index . --url https://charts.example.com/
# Creates: index.yaml
Two shapes in that block are easy to get backwards. ingress.hosts is a list of mappings — the template renders .host and iterates .paths — while tls[].hosts is a list of strings, ranged as scalars. And enabled: true is required in each environment file because the base values.yaml ships ingress.enabled: false and the whole template is wrapped in that guard; omit it and the ingress renders nothing at all, silently.
See EXAMPLES.md for the complete values-dev.yaml and values-prod.yaml
Test with different environments:
# Test development values
helm install my-app-dev my-app -f values-dev.yaml --dry-run --debug
# Test production values
helm install my-app-prod my-app -f values-prod.yaml --dry-run --debug
# Install to dev namespace
helm install my-app my-app -f values-dev.yaml -n development --create-namespace
# Install to prod namespace
helm install my-app my-app -f values-prod.yaml -n production --create-namespace
Expected: Chart passes all lint checks. Template rendering produces valid Kubernetes YAML. Tests pass successfully. Chart packages without errors. Different values files work for each environment. Installation succeeds without warnings.
On failure:
Review lint output for specific issues
Check template syntax errors with --debug flag
Verify all required values are set: helm get values <release>
Test dependency resolution: helm dependency list my-app
Validate packaged chart: tar -tzf my-app-0.1.0.tgz
Check for missing files in package
Step 6: Publish to Chart Repository
Set up chart repository and publish versioned releases.
See Extended Examples for ChartMuseum setup, release automation, and complete README template.
Expected: Chart published to repository successfully. Chart discoverable via helm search. Installation works from repository. Versioning follows SemVer.
On failure:
Verify repository URL accessible
Check index.yaml generated: helm repo index --help
For OCI registries, ensure authentication working
Test repository addition: helm repo add test <url>