Execute use when generating Helm charts for Kubernetes applications.
ReadWriteEditGrepGlobBash(helm:*)Bash(kubectl:*)
Generating Helm Charts
Overview
Generate production-ready Helm 3 charts for Kubernetes applications with Chart.yaml, values.yaml, Go templates, and helper functions. Support multi-environment deployments with values overrides, dependency management, security contexts, health probes, and resource limits following Helm best practices.
Prerequisites
- Helm 3.x installed (
helm version)
kubectl configured with cluster access for testing chart installation
- Container images available in a registry accessible from the cluster
- Understanding of application resource requirements (CPU, memory, ports, volumes)
- Chart repository access if publishing (ChartMuseum, OCI registry, or GitHub Pages)
Instructions
- Analyze the application: identify container images, ports, environment variables, volumes, and dependencies
- Scaffold the chart structure:
Chart.yaml, values.yaml, templates/, charts/, .helmignore
- Create
Chart.yaml with apiVersion: v2, name, version, appVersion, and dependency declarations
- Define
values.yaml with sensible production defaults: replica count, image config, resource limits, ingress settings
- Build templates using Go template syntax with proper
.Values references and _helpers.tpl for reusable named templates
- Add health checks:
livenessProbe and readinessProbe in the deployment template with configurable paths and thresholds
- Configure security context:
runAsNonRoot: true, readOnlyRootFilesystem: true, and drop all capabilities
- Create environment-specific values files:
values-dev.yaml, values-staging.yaml, values-prod.yaml
- Add
NOTES.txt with post-install instructions showing how to access the application
- Validate with
helm lint . and test rendering with helm template . --values values-prod.yaml
Output
- Complete Helm chart directory structure
Chart.yaml with metadata and dependencies
values.yaml with documented, configurable defaults
- Template files:
deployment.yaml, service.yaml, ingress.yaml, configmap.yaml, serviceaccount.yaml, hpa.yaml
_helpers.tpl with name, label, and selector helper templates
NOTES.txt with post-install access instructions
- Environment-specific values override files
Error Handling
| Error |
Cause |
Solution |
Chart.yaml: version is required |
Missing o
Ready to use helm-chart-generator?
|