Converting kubectl Manifests to Helm Charts#
You have a set of YAML files that you kubectl apply to deploy your application. They work, but deploying to a second environment means copying files and editing values by hand. Helm charts solve this by parameterizing your manifests.
Step 1: Scaffold the Chart#
Create the chart structure with helm create:
helm create my-appThis generates:
my-app/
Chart.yaml # Chart metadata (name, version, appVersion)
values.yaml # Default configuration values
charts/ # Subcharts / dependencies
templates/
deployment.yaml # Deployment template
service.yaml # Service template
ingress.yaml # Ingress template
hpa.yaml # HorizontalPodAutoscaler
serviceaccount.yaml
_helpers.tpl # Named template helpers
NOTES.txt # Post-install message
tests/
test-connection.yamlDelete the generated templates you do not need. Keep _helpers.tpl – it provides essential naming functions.