Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 534
Jacob Avatar asked Apr 16 '19 13:04

Jacob


People also ask

How do I install helm tiller?

The easiest way to install tiller into the cluster is simply to run helm init . This will validate that helm 's local environment is set up correctly (and set it up if necessary). Then it will connect to whatever cluster kubectl connects to by default ( kubectl config view ).

What happened helm tiller?

13, however, Tiller was removed entirely, and Helm version 3 now communicates directly with the Kubernetes API Server. Such was the antipathy for Helm Tiller among users that when maintainers proclaimed the component's death from the KubeCon keynote stage here this week, it drew enthusiastic cheers.

Does helm 3 require tiller?

In helm 3 there is no tiller component. Helm client directly interacts with the kubernetes API for the helm chart deployment. So from wherever you are running the helm command, you should have kubectl configured with cluster-admin permissions for helm to execute the manifests in the chart.

Is tiller required for helm?

Why Was Tiller Needed? Tiller was used as an in-cluster operator by the helm to maintain the state of a helm release. It's also used to save the release information of all the releases done by the tiller — it uses config-map to save the release information in the same namespace in which Tiller is deployed.


1 Answers

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/

like image 191
Esteban Garcia Avatar answered Sep 17 '22 11:09

Esteban Garcia