Search code examples
kuberneteskubernetes-helm

Command not found error when initializing the tiller using `helm init`


I am trying to use Kubernetes cluster with Kubernetes Helm chart for defining the Kubernetes services and deployment. I installed Helm client on one machine by using the following command,

sudo snap install helm --classic

And I accessed the Kubernetes cluster master node and trying to run helm init command. But when I am running I am getting the error,

helm: command not found

And when I am checking Kubernetes cluster installation, kubectl commands are properly running.

For the "command not found", how can I solve my Kubernetes Helm Tiller initialization issue?


Solution

  • You need to run helm init on the same machine where you installed the helm client. That will install tiller on the Kubernetes cluster you have configured on your kubeconfig.

    There are two parts of Helm, the Client (what is called helm) and the server (called tiller).

    Tiller runs (most of the times) on your Kubernetes cluster and manages the releases (the charts you deploy).

    Helm runs on your local machine, CI/CD or where you want.

    Helm is also used for deploying tiller into your K8S cluster. This happens when you execute helm init and by default it'll create a kubernetes deployment called tiller-deploy on the kube-system namespace. This tiller deployment is what the helm client will use as a server.

    Helm discovers automatically where to install tiller by checking your kubeconfig (~/.kube/config) file and by default it will use the selected context there.

    You always use the helm cli from your local machine or CI/CD you don't use it from your Kubernetes master(s).

    Edit: This was true for Helm v2, now with Helm v3 tiller no longer exists, the deployment of the chart is done by the helm client itself and helm init is no longer necessary.

    https://helm.sh/blog/helm-3-released/