Helm: could not find tiller
Asked Answered
L

8

47

I'm getting this error message:

➜  ~ helm version
Error: could not find tiller

I've created tiller project:

➜  ~ oc new-project tiller
Now using project "tiller" on server "https://192.168.99.100:8443".

Then, I've created tiller into tiller namespace:

➜  ~ helm init --tiller-namespace tiller
$HELM_HOME has been configured at /home/jcabre/.helm.

Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.

Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
To prevent this, run `helm init` with the --tiller-tls-verify flag.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation
Happy Helming!

So, after that, I've been waiting for tiller pod is ready.

➜  ~ oc get pod -w
NAME                             READY     STATUS    RESTARTS   AGE
tiller-deploy-66cccbf9cd-84swm   0/1       Running   0          18s
NAME                             READY     STATUS    RESTARTS   AGE
tiller-deploy-66cccbf9cd-84swm   1/1       Running   0          24s
^C%               

Any ideas?

Lodge answered 2/8, 2018 at 6:35 Comment(0)
M
72

Try deleting your cluster tiller

kubectl get all --all-namespaces | grep tiller
kubectl delete deployment tiller-deploy -n kube-system
kubectl delete service tiller-deploy -n kube-system
kubectl get all --all-namespaces | grep tiller

Initialise it again:

helm init

Now add the service account:

kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'

This solved my issue!

Manmade answered 7/2, 2019 at 14:18 Comment(3)
On the last kubectl patch command it gave me the error Error from server (NotFound): deployments.apps "tiller-deploy" not foundSami
From version 3.0 helm init is no longer required and tiller is goneKurr
@theduck The first command kubectl get all --all-namespaces | grep tiller give the below output: tiller service/tiller-deploy ClusterIP 10.104.79.35 <none> 44134/TCP 3h58m tiller deployment.apps/tiller-deploy 0/1 0 0 3h58m However, when I try to delete the deployment/service it is not found. kubectl delete deployment tiller-deploy -n kube-system Error from server (NotFound): deployments.extensions "tiller-deploy" not foundThymelaeaceous
M
24

You don't have helm configured yet, use the following command:

helm init

This will create .helm with repository, plugins, etc, in your home directory.

Background: helm comes with client and server, if you have a different deployment environment, it might be possible that your helm server (known as tiller) is different, in that case, there are two ways to point to tiller

  • set environment variable TILLER_NAMESPACE
  • --tiller-namespace string namespace of Tiller (default "kube-system")

For more details check the helm READ.md file.

Mayda answered 4/10, 2018 at 20:36 Comment(1)
@Lodge if you think this answered your question then, please accept it. Else, please post your further queries.Mayda
S
13

First of all you need to create service account for teller to use in helm:

kubectl -n kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller

To verify that Tiller is running:

kubectl get pods --namespace kube-system

DigitalOcean Reference

Sleepyhead answered 30/3, 2019 at 13:2 Comment(4)
helm init --service-account tiller returning Error: unknown flag: --service-accountSami
admin1@POC-k8s-master:~/poc-cog/metrics-server$ kubectl get pods --namespace kube-system NAME READY STATUS RESTARTS AGE tiller-deploy-86f55698f8-xf5d5 1/1 Running 0 29sBailey
admin1@POC-k8s-master:~/poc-cog/metrics-server$ helm ls Error: Get 10.96.0.1:443/api/v1/namespaces/kube-system/…: dial tcp 10.96.0.1:443: i/o timeout admin1@POC-k8s-master:~/poc-cog/metrics-server$ helm init $HELM_HOME has been configured at /home/admin1/.helm. Error: error installing: the server could not find the requested resourceBailey
This is because version of your helm tiller. Check this Helm Github RefSleepyhead
B
12

You installed tiller into a non-default namespace, so you have to tell helm where to look.

helm --tiller-namespace tiller  version
Blackness answered 2/8, 2018 at 21:15 Comment(1)
That worked. Since I've installed tiller via terraform, I automatically added a namespace. Beware!Patrickpatrilateral
L
10

Now you can upgrade to the latest version of Helm or any version > 3.0.0.

You don't need to do

helm init

anymore.

The Tiller and client directories are initialised automatically when you start using helm. As mentioned here

Landholder answered 31/12, 2019 at 16:3 Comment(0)
O
3

I was facing the same issue, try to re-install helm by using the commands below:

For linux: (Via Snap)

sudo snap install helm --classic

For Linux (from Binary source):

  1. Download your desired version
  2. Unpack it (tar -zxvf helm-v2.0.0-linux-amd64.tgz)
  3. Find the helm binary in the unpacked directory, and move it to its desired destination (mv linux-amd64/helm /usr/local/bin/helm)

For MacOS (Via brew):

brew install kubernetes-helm

For windows (Via Chocolatey):

choco install kubernetes-helm

And finaly, intialize the helm:

helm init
Octane answered 9/1, 2019 at 8:30 Comment(0)
L
2

With helm 3 releases, we do not need tiller anymore. Try to upgrade the helm version to 3. It provides more security to your cluster.Because tiller runs in your Kubernetes cluster with full administrative rights, which is a risk if somebody gets unauthorized access to the cluster. If you migrate to helm3, you do not need to do helm init thereafter because helm version 3 is a tiller-less architecture.

Lasko answered 25/2, 2020 at 2:43 Comment(0)
U
0

try

cp /usr/local/bin/tiller ~/.helm/

and check if the helm is deployed on server with

helm version
Unwinking answered 24/7, 2020 at 13:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.