Error initialising helm in k3s - "the server could not find the requested resource"

12/20/2019

I am running k3s in a docker container using k3d. My cluster info:

$ kubectl cluster-info
Kubernetes master is running at https://127.0.0.1:6443
CoreDNS is running at https://127.0.0.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

And:

$ k3d list
+-------------+-------------------------------+---------+---------+
|    NAME     |             IMAGE             | STATUS  | WORKERS |
+-------------+-------------------------------+---------+---------+
| k3s-default | docker.io/rancher/k3s:v0.10.0 | running |  10/10  |
+-------------+-------------------------------+---------+---------+

I'm using the following commands to initialise helm:

$ kubectl -n kube-system create serviceaccount tiller
serviceaccount/tiller created

$ kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
clusterrolebinding.rbac.authorization.k8s.io/tiller created

$ HELM_HOME=/home/mike/.k3s_helm KUBECONFIG=/home/mike/.config/k3d/k3s-default/kubeconfig.yaml helm init --service-account tiller
Creating /home/mike/.k3s_helm 
Creating /home/mike/.k3s_helm/repository 
Creating /home/mike/.k3s_helm/repository/cache 
Creating /home/mike/.k3s_helm/repository/local 
Creating /home/mike/.k3s_helm/plugins 
Creating /home/mike/.k3s_helm/starters 
Creating /home/mike/.k3s_helm/cache/archive 
Creating /home/mike/.k3s_helm/repository/repositories.yaml 
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com 
Adding local repo with URL: http://127.0.0.1:8879/charts 
$HELM_HOME has been configured at /home/mike/.k3s_helm.
Error: error installing: the server could not find the requested resource

Any ideas what resource it's complaining about?

-- Mike Stoddart
k3s
kubernetes-helm

1 Answer

12/23/2019

I had to install a newer version (v2.16.1) of Helm. I was using 2.14.x.

-- Mike Stoddart
Source: StackOverflow