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

前端 未结 9 1662

What I Did:
I installed Helm with

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


        
相关标签:
9条回答
  • 2020-12-09 05:39
    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 -
    
    0 讨论(0)
  • 2020-12-09 05:41

    try

    apt-get upgrade helm in my case it worked.

    0 讨论(0)
  • 2020-12-09 05:46

    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.

    0 讨论(0)
  • 2020-12-09 05:46

    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
    0 讨论(0)
  • 2020-12-09 05:50

    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.

    0 讨论(0)
  • 2020-12-09 05:51

    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.

    0 讨论(0)
提交回复
热议问题