Exercise

  1. Search for the nginx Chart maintained by Bitnami in the ArtifactHub, and find the repository URL

  2. Add the Bitnami Helm repository to your local Helm installation

ℹ️
The repository’s path is https://charts.bitnami.com/bitnami
  1. Create a namespace called web-apps

  2. Install the nginx Chart as a release named my-nginx in the web-apps namespace using version 15.4.4

  3. List all Helm releases and verify the installation status

  4. Get the manifest and values of the my-nginx release

  5. Create a custom values file named custom-values.yaml that:

    • Sets the replica count to 3
    • Changes the service type to NodePort
    • Sets a custom image tag to 1.25.3
  6. Upgrade the my-nginx release using your custom values file

  7. Check the rollout history of the release

  8. Rollback the release to the previous version

  9. Uninstall the my-nginx release

  10. Remove the web-apps namespace

Documentation

https://helm.sh/docs/


Solution
  1. Search for the nginx Chart maintained by Bitnami in the ArtifactHub, and find the repository URL
helm search hub nginx bitnami
  1. Add the Bitnami Helm repository
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
  1. Create a namespace called web-apps
kubectl create namespace web-apps
  1. Install the nginx Chart as a release named my-nginx in the web-apps namespace
helm install my-nginx bitnami/nginx --namespace web-apps
ℹ️
We can use the --version flag to specify the version of the Chart to install. If no version is provided, the latest version of the Chart is installed.
  1. List all Helm releases and verify the installation status
helm list --namespace web-apps
helm status my-nginx --namespace web-apps
  1. Get the manifest and values of the my-nginx release
helm get manifest my-nginx --namespace web-apps
helm get values my-nginx --namespace web-apps
  1. Create a custom values file named custom-values.yaml
custom-values.yaml
replicaCount: 3

service:
  type: NodePort

image:
  tag: "1.25.3"
  1. Upgrade the my-nginx release using your custom values file
helm upgrade my-nginx bitnami/nginx --namespace web-apps -f custom-values.yaml
  1. Check the rollout history of the release
helm history my-nginx --namespace web-apps
  1. Rollback the release to the previous version
helm rollback my-nginx 1 --namespace web-apps
  1. Uninstall the my-nginx release
helm uninstall my-nginx --namespace web-apps
  1. Remove the web-apps namespace
kubectl delete namespace web-apps