This article will explain you about helm commands along with commonly used options. You may treat this article as helm commands cheat sheet. I have explained widely used helm version 2 command in this article.
In case you want to learn about how to install helm version please follow this article.
So here the helm commands cheat sheet list for quick go through:
-
helm help
In case you want any help on command available with helm.
# helm help
Lets suppose you want more details about any command option you can use helm help <command> as below. Here in the below case we taken help on search command:
# helm help search
-
helm search
In case you want to search for any chart you can helm search command for the same.
# helm search phpmyadmin NAME CHART VERSION APP VERSION DESCRIPTION stable/phpmyadmin 4.3.5 5.0.1 DEPRECATED phpMyAdmin is an mysql administration frontend
-
helm fetch
In case you don’t want to install the helm chart however you just want to download the chart locally then use helm along with fetch option followed by chart name as below. It will download all chart and template files in the current directory.
# helm fetch stable/phpmyadmin # ls -ltr total 32 -rw-r--r-- 1 root root 28921 Jun 29 11:04 phpmyadmin-4.3.5.tgz #
-
helm install
If you want to install helm chart use install option followed by chart name . You can user –values option in case you want to use your own values.yaml file. In case you want to give it name to the deployed chart use –name option as below also chart version could be specified using –version option as below:
# helm install stable/phpmyadmin --name myphpadmin --version 4.3.3
The above command also gives overview of the resources deployed by helm in the output. In case you want to check it from the kubernetes front use below command:
# kubectl get all |grep -i myphpadmin pod/myphpadmin-phpmyadmin-76966d4fd-wvf7l 0/1 Running 1 79s service/myphpadmin-phpmyadmin ClusterIP 10.99.151.168 <none> 80/TCP 80s deployment.apps/myphpadmin-phpmyadmin 0/1 1 0 79s replicaset.apps/myphpadmin-phpmyadmin-76966d4fd 1 1 0 79s #
-
helm status
This command will give the curent status of the chart installation. You need to give the name of the chart which is being used in the helm install command as below:
# helm status myphpadmin
-
helm list
To list down currently deployed chart use helm list command.
# helm list NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE myphpadmin 1 Mon Jun 29 11:35:32 2020 DEPLOYED phpmyadmin-4.3.3 5.0.1 default #
-
helm upgrade
In case you want to upgrade the current version of helm chart, use upgrade command. In our helm install example we installed version 4.3.3 now we will upgrading the chart to 4.3.4 version using below command.
# helm upgrade myphpadmin stable/phpmyadmin --version 4.3.4
-
helm history
To check the history of the chart installed use command helm history followed by chartname.
# helm history myphpadmin REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION 1 Mon Jun 29 11:35:32 2020 SUPERSEDED phpmyadmin-4.3.3 5.0.1 Install complete 2 Mon Jun 29 11:53:48 2020 DEPLOYED phpmyadmin-4.3.4 5.0.1 Upgrade complete #
-
helm rollback
In case you are not happy with upgraded version and you want to rollback to previous version use helm rollback along with revision number as below:
# helm rollback myphpadmin 1 Rollback was a success. #
-
helm delete
To delete the installed chart use helm delete command as below:
# helm delete myphpadmin release "myphpadmin" deleted #
-
helm repo list
To list down currently used repositories use helm repo list command.
# helm repo list NAME URL stable https://kubernetes-charts.storage.googleapis.com local http://127.0.0.1:8879/charts #
-
helm repo update
To update repositories use helm repo update command.
# helm repo update Hang tight while we grab the latest from your chart repositories... ...Skip local chart repository ...Successfully got an update from the "stable" chart repository Update Complete. #
-
helm reset
If you want to uninstall the tiller component use command helm reset along with option “–remove-helm-home” in case you want to remove the home directory of the helm. Also -f option to do it forcefully.
# helm reset -f --remove-helm-home Deleting /root/.helm Tiller (the Helm server-side component) has been uninstalled from your Kubernetes Cluster. #
To explore more commands follow this link.