- Helm CLI tool
- Recommended editor: Visual Studio Code + Kubernetes extension
- Create chart skeleton:
helm create <chart-name> - Install chart:
helm install <release-name> ./gateway-chart -f values-dev.yml (-n <namespace>) - Upgrade chart:
helm upgrade <release-name> ./gateway-chart (-n <namespace>)- useful flags:
--reset-values --atomic
- useful flags:
- Release history:
helm history <release-name> (-n <namespace>) - Release rollback:
helm rollback <release-name> <revision> (-n <namespace>)
Demos the absolute basics of a Helm chart.
simple-chart only has a single kubernetes Deployment, a ConfigMap and 2 template values.
- Install:
helm install simple ./simplest-chart - Test the deployment:
kubectl port-forward deploy/simplest-nginx 8888:80 - Enable HTML override:
helm upgrade simple ./simplest-chart --set overrideHtml=true - What happened to the deployment's website? Try changing the HTML in the ConfigMap
- Change image:
helm upgrade simple ./simplest-chart --set imageTag=stable - Uninstall:
helm uninstall simple
In the above commands simple is the release-name. It can be installed several times under different names & namespaces.
Try installing in a different namespace:
- Create namespace:
kubectl create namespace demo - Install into namespace:
helm install simple ./simplest-chart --namespace demo, what happens?
- Install gateway-chart.
- Test that the basics are working according to NOTES.txt output.
- Implement the TODOs in templated manifests.
Success criteria:
- Value
api.enabledtoggles /api route to the backend container. - Value
service.portcontrols the exposed port of the nginx proxy. - Value
backend.portcontrols which port the backend exposes and nginx proxies to (if enabled). - Value
backend.textchanges the backend /api response. - Value
replicaCountaffects number of pods.
helm lint ./gateway-chartpasses.helm template ./gateway-chartrenders valid YAML.
After install:
/returns gateway text/apireturns backend text
Break your app, then fix it again:
- Upgrade the chart using
-f values-broken.yml - Try to deploy using
--atomic --timeout 10s, what happens? - Check the
values-broken.ymlcomments - Answer and solve the issues one by one.
- Install 2 versions of gateway-chart in each their namespace use
--namespace xwhen installing). - Do they conflict? How to fix this?
- Charts can be installed from a repository
- Add a repository:
helm repo add <name> <url> - Search for available apps
helm search repo <repo> - Check available versions of specific chart
helm search repo <repo>/<chart> --versions - Install a given app:
helm install <repo>/<chart> --version "1.2.3."
Suggested repos you can add:
- https://helm.github.io/examples (hello-world app)
- https://helm.elastic.co (elasticsearch)
- https://charts.gitlab.io/ (gitlab)
- https://github.com/cdwv/awesome-helm?tab=readme-ov-file#repositories--hubs