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 or malformed version field |
Add a valid SemVer version string to Chart.yaml |
parse error in template |
Go template syntax error (missing end, wrong function) |
Run helm template . to pinpoint the error; check bracket matching and function names |
dependency not found |
Chart dependency not downloaded |
Run helm dependency update to fetch dependencies into charts/ |
release failed: timed out waiting for condition |
Pods not reaching ready state during install |
Check pod logs; verify image exists, resource limits are sufficient, and probes are correct |
values override not applied |
Wrong values file path or key mismatch |
Verify --values file path and that keys match the structure in values.yaml exactly |
Examples
- "Generate a Helm chart for a Node.js API with 3 replicas, an Nginx ingress, PostgreSQL subchart dependency, and environment-specific values for dev and prod."
- "Create a Helm chart for a stateful application with PersistentVolumeClaim, headless service, and configurable storage class."
- "Package an existing set of Kubernetes manifests into a Helm chart with parameterized image tag, replica count, and resource limits."
Resources
Source: jeremylongshore/claude-code-plugins-plus-skills → skills/.curated/generating-helm-charts/SKILL.md
Also appears in: jeremylongshore/claude-code-plugins-plus-skills/plugins/devops/helm-chart-generator/skills/generating-helm-charts/SKILL.md
1---2name: generating-helm-charts3description: 'Execute use when generating Helm charts for Kubernetes applications. Trigger with phrases like "create Helm chart", "generate chart for app", "package Kubernetes deployment", or "helm template". Produces production-ready charts with Chart.yaml, values.yaml, templates, and best practices for multi-environment deployments. '4---56# Generating Helm Charts78## Overview910Generate 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.1112## Prerequisites1314- Helm 3.x installed (`helm version`)15- `kubectl` configured with cluster access for testing chart installation16- Container images available in a registry accessible from the cluster17- Understanding of application resource requirements (CPU, memory, ports, volumes)18- Chart repository access if publishing (ChartMuseum, OCI registry, or GitHub Pages)1920## Instructions21221. Analyze the application: identify container images, ports, environment variables, volumes, and dependencies232. Scaffold the chart structure: `Chart.yaml`, `values.yaml`, `templates/`, `charts/`, `.helmignore`243. Create `Chart.yaml` with `apiVersion: v2`, name, version, appVersion, and dependency declarations254. Define `values.yaml` with sensible production defaults: replica count, image config, resource limits, ingress settings265. Build templates using Go template syntax with proper `.Values` references and `_helpers.tpl` for reusable named templates276. Add health checks: `livenessProbe` and `readinessProbe` in the deployment template with configurable paths and thresholds287. Configure security context: `runAsNonRoot: true`, `readOnlyRootFilesystem: true`, and drop all capabilities298. Create environment-specific values files: `values-dev.yaml`, `values-staging.yaml`, `values-prod.yaml`309. Add `NOTES.txt` with post-install instructions showing how to access the application3110. Validate with `helm lint .` and test rendering with `helm template . --values values-prod.yaml`3233## Output3435- Complete Helm chart directory structure36- `Chart.yaml` with metadata and dependencies37- `values.yaml` with documented, configurable defaults38- Template files: `deployment.yaml`, `service.yaml`, `ingress.yaml`, `configmap.yaml`, `serviceaccount.yaml`, `hpa.yaml`39- `_helpers.tpl` with name, label, and selector helper templates40- `NOTES.txt` with post-install access instructions41- Environment-specific values override files4243## Error Handling4445| Error | Cause | Solution |46|-------|-------|---------|47| `Chart.yaml: version is required` | Missing or malformed `version` field | Add a valid SemVer version string to Chart.yaml |48| `parse error in template` | Go template syntax error (missing `end`, wrong function) | Run `helm template .` to pinpoint the error; check bracket matching and function names |49| `dependency not found` | Chart dependency not downloaded | Run `helm dependency update` to fetch dependencies into `charts/` |50| `release failed: timed out waiting for condition` | Pods not reaching ready state during install | Check pod logs; verify image exists, resource limits are sufficient, and probes are correct |51| `values override not applied` | Wrong values file path or key mismatch | Verify `--values` file path and that keys match the structure in `values.yaml` exactly |5253## Examples5455- "Generate a Helm chart for a Node.js API with 3 replicas, an Nginx ingress, PostgreSQL subchart dependency, and environment-specific values for dev and prod."56- "Create a Helm chart for a stateful application with PersistentVolumeClaim, headless service, and configurable storage class."57- "Package an existing set of Kubernetes manifests into a Helm chart with parameterized image tag, replica count, and resource limits."5859## Resources6061- Helm documentation: https://helm.sh/docs/62- Chart best practices: https://helm.sh/docs/chart_best_practices/63- Template function reference: https://helm.sh/docs/chart_template_guide/function_list/64- Artifact Hub (chart discovery): https://artifacthub.io/6566---6768**Source:** [`jeremylongshore/claude-code-plugins-plus-skills`](https://github.com/jeremylongshore/claude-code-plugins-plus-skills) → `skills/.curated/generating-helm-charts/SKILL.md`6970**Also appears in:** `jeremylongshore/claude-code-plugins-plus-skills/plugins/devops/helm-chart-generator/skills/generating-helm-charts/SKILL.md`