Exercise
Search for the
nginxChart maintained by Bitnami in the ArtifactHub, and find the repository URLAdd the Bitnami Helm repository to your local Helm installation
ℹ️
The repository’s path is https://charts.bitnami.com/bitnami
Create a namespace called
web-appsInstall the nginx Chart as a release named
my-nginxin theweb-appsnamespace using version15.4.4List all Helm releases and verify the installation status
Get the manifest and values of the
my-nginxreleaseCreate a custom values file named
custom-values.yamlthat:- Sets the replica count to 3
- Changes the service type to NodePort
- Sets a custom image tag to
1.25.3
Upgrade the
my-nginxrelease using your custom values fileCheck the rollout history of the release
Rollback the release to the previous version
Uninstall the
my-nginxreleaseRemove the
web-appsnamespace
Documentation
Solution
- Search for the
nginxChart maintained by Bitnami in the ArtifactHub, and find the repository URL
helm search hub nginx bitnami- Add the Bitnami Helm repository
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update- Create a namespace called
web-apps
kubectl create namespace web-apps- Install the nginx Chart as a release named
my-nginxin theweb-appsnamespace
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.- List all Helm releases and verify the installation status
helm list --namespace web-apps
helm status my-nginx --namespace web-apps- Get the manifest and values of the
my-nginxrelease
helm get manifest my-nginx --namespace web-apps
helm get values my-nginx --namespace web-apps- Create a custom values file named
custom-values.yaml
custom-values.yaml
replicaCount: 3
service:
type: NodePort
image:
tag: "1.25.3"- Upgrade the
my-nginxrelease using your custom values file
helm upgrade my-nginx bitnami/nginx --namespace web-apps -f custom-values.yaml- Check the rollout history of the release
helm history my-nginx --namespace web-apps- Rollback the release to the previous version
helm rollback my-nginx 1 --namespace web-apps- Uninstall the
my-nginxrelease
helm uninstall my-nginx --namespace web-apps- Remove the
web-appsnamespace
kubectl delete namespace web-apps