Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: error installing: the server could not find the requested resource HELM Kubernetes

What I Did:
I installed Helm with

curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
helm init --history-max 200


Getting an error:

$HELM_HOME has been configured at /root/.helm.
Error: error installing: the server could not find the requested resource
  1. what does that error mean?
  2. How should I install Helm and tiller?

Ubuntu version: 18.04
Kubernetes version: 1.16
Helm version:

helm version
Client: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}
Error: could not find tiller

Update:
I tried @shawndodo's answer but still tiller not installed

helm init --service-account tiller --override spec.selector.matchLabels.'name'='tiller',spec.selector.matchLabels.'app'='helm'
--output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | kubectl apply -f -

Update 2:
helm init --history-max 200 working in kubernetes version 1.15

like image 295
AATHITH RAJENDRAN Avatar asked Sep 24 '19 07:09

AATHITH RAJENDRAN


4 Answers

I met the same problem, then I found this reply on here.

helm init --service-account tiller --override spec.selector.matchLabels.'name'='tiller',spec.selector.matchLabels.'app'='helm' --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | kubectl apply -f -

It works for me. You can see the detail in this issue.

like image 60
shawndodo Avatar answered Oct 18 '22 16:10

shawndodo


Unfortunately, Helm is not working with the current version of Kubernetes (1.16.0) as we can see on the issue #6374

For now, we can work around the incompatibility by selecting an older version of Kubernetes.

Starting minikube with a previous Kubernetes version

To solve this issue, simply start the minikube setting the version using the --kubernetes-version param (Ref.):

minikube delete

minikube start --kubernetes-version=1.15.4

Try to reboot the Helm too with the following command:

helm init

After that, you will be able to use the Helm without problems.

like image 28
valdeci Avatar answered Oct 18 '22 16:10

valdeci


So tiller is the server side component that your helm client talks to (tiller is due to be removed in Helm 3 due to various security issues). When running helm init the helm client installs tiller on the cluster that your kubectl is currently setup to connect with (keep in mind that in order to install tiller you need admin access the cluster as tiller needs cluster-wide admin access) However there are many different strategies to work with tiller:

  • tiller per namespace: This is when you install tiller in a single namespace and only give it access to that namespace (vastly more secure than giving it cluster wide admin), you can find an article on how to here
  • tillerless: This is when you run tiller locally, you will need to export HELM_HOST to poiunt to this tiller and tiller will use the kube config configured at KUBECONFIG more information found here
like image 35
Spazzy757 Avatar answered Oct 18 '22 16:10

Spazzy757


I ran into the same issue - exactly the same configuration as initial question: Ubuntu version: 18.04 Kubernetes version: 1.16

@shawndodo's answer didn't work for me. There were some issues with the tiller deployment and the tiller pod was not getting created at all!

I tried installing the from canary build as described in Helm docs - https://helm.sh/docs/using_helm/#from-canary-builds

helm init --canary-image --upgrade

This didn't work a couple days ago, but tried again (with newer canary build) and it worked today (20191005).

Whether I run into other issues now using canary build remains to be seen, but I got past the initialisation issue...

like image 44
Ryan.Bartsch Avatar answered Oct 18 '22 14:10

Ryan.Bartsch