This is a Helm demo using Dev Containers. It was created as part of the presentation "An introduction to Helm: A better way to manage your Kubernetes applications" at the Cloud Native Computing Meetup | November 2023
You can use DevContainer to run everything inside Docker without installing anything. Start the DevContainer either within VS Code or with GitHub Codespaces.
- Use the Dev Containers in VS Code: Reopen in Container command from the Command Palette (
F1
,Ctrl+Shift+P
).
Let's deploy a simple nginx http server for Bitnami.
You can also run this with the script
./demo-1.sh
helm install hello-world oci:https://registry-1.docker.io/bitnamicharts/nginx
test it
kubectl port-forward svc/hello-world-nginx 8000:80
Check what we have deployed:
- Via the web page https://artifacthub.io/packages/helm/bitnami/nginx
- Locally
you can also run this with the script
./demo-2.sh
- Download and unpack the Helm chart
helm pull oci:https://registry-1.docker.io/bitnamicharts/nginx --untar --untardir out/
- Inspect the out folder
tree out/ -L 3
- Download and unpack the Helm chart
- See how it looks after it is rendered
you can also run this with the script
./demo-3.sh
helm template --output-dir './out' hello-world oci:https://registry-1.docker.io/bitnamicharts/nginx
- Release
helm install hello-world oci:https://registry-1.docker.io/bitnamicharts/nginx
- Check the release
you can also run this with the script
./demo-4.sh
helm ls
You can also run this with the script
./demo-10.sh
kubectl get po
helm upgrade hello-world oci:https://registry-1.docker.io/bitnamicharts/nginx --set replicaCount=2
kubectl get po
helm ls
helm rollback hello-world
kubectl get po
helm upgrade hello-world oci:https://registry-1.docker.io/bitnamicharts/nginx -f hello-world-values.yaml
helm plugin install https://github.com/databus23/helm-diff
helm diff upgrade hello-world oci:https://registry-1.docker.io/bitnamicharts/nginx -f hello-world-values.yaml
helm uninstall hello-world
helmfile apply
(Make sure to uninstall the old chart first if you haven't done so already: helm uninstall hello-world
)
terraform init
terraform apply
- The creation of a chart has already been completed; you can achieve this by using
helm create mychart
helm install mychart mychart
helm ls
kubectl get configmap
kubectl get configmap mychart-config-map -o yaml