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

9/24/2019

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

-- AATHITH RAJENDRAN
kubernetes
kubernetes-helm

9 Answers

9/24/2019

We need to have tiller installed in the cluster before we start using helm. helm init command installs tiller in the cluster and also we need to have RBAC configured in the cluster for tiller as well. Here you'll find out the RBAC rules required as per your need for your k8s cluster.

-- Tyto
Source: StackOverflow

10/23/2019
  • kubectl version: v1.16.0
  • helm version: v2.14.3

    minikube start --memory=16384 --cpus=4
    
    helm init --service-account tiller --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | sed 's@  replicas: 1@  replicas: 1\n  selector: {"matchLabels": {"app": "helm", "name": "tiller"}}@' | kubectl apply -f -
    
    helm template istio-1.3.3/install/kubernetes/helm/istio-init --name istio-init --namespace istio-system | kubectl apply -f - 
    
    helm template istio-1.3.3/install/kubernetes/helm/istio --name istio --namespace istio-system | kubectl apply -f -
-- Dumindu Madunuwan
Source: StackOverflow

2/4/2020

try

apt-get upgrade helm in my case it worked.

-- Karthik Reddy
Source: StackOverflow

9/24/2019

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.

-- shawndodo
Source: StackOverflow

10/20/2019

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.

-- valdeci
Source: StackOverflow

10/5/2019

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...

-- Ryan.Bartsch
Source: StackOverflow

10/17/2019

I tried all suggestions about changing the api version manually to fix this issue, this got rid of the errors but things didnt work properly afterwards. so in my case I removed my latest minicube installation and installed an old one on my mac using the below command, change minikube-darwin-amd64 to minikube-linux-amd64 if needed :

curl -LO https://storage.googleapis.com/minikube/releases/v1.3.0/minikube-darwin-amd64 \
  && sudo install minikube-darwin-amd64 /usr/local/bin/minikube

This downgraded my kubernetes to v1.15.2 which helm currently supports.

-- Gth lala
Source: StackOverflow

9/24/2019

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
-- Spazzy757
Source: StackOverflow

4/27/2020
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 -
-- Avinash Rathod
Source: StackOverflow