gpt4 book ai didi

linux - 运行`Error: could not find tiller`时`helm version`

转载 作者:行者123 更新时间:2023-12-01 09:42:27 36 4
gpt4 key购买 nike

我安装了minikubekubectl:

$ minikube version
minikube version: v1.4.0
commit: 7969c25a98a018b94ea87d949350f3271e9d64b6

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:36:53Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:27:17Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

然后,我按照 https://helm.sh/docs/using_helm/的指示进行操作:
  • 我已经下载了https://get.helm.sh/helm-v2.13.1-linux-amd64.tar.gz
  • 我已经运行
  • $ tar -xzvf Downloads/helm-v2.13.1-linux-amd64.tar.gz linux-amd64/
    linux-amd64/LICENSE
    linux-amd64/tiller
    linux-amd64/helm
    linux-amd64/README.md

    但是现在,如果我检查自己的 helm版本,则会得到以下信息:
    $ helm version
    Client: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}
    Error: could not find tiller

    我尝试运行 helm init,但得到以下信息:
    $ helm init
    $HELM_HOME has been configured at /home/SERILOCAL/<my-username>/.helm.
    Error: error installing: the server could not find the requested resource

    如何获得 helm正确初始化?

    最佳答案

    当前掌 Helm 版本不适用于kubernetes 1.16.0版本

    您可以将kubernetes降级到1.15.3版

    minikube start --kubernetes-version 1.15.3
    helm init

    或使用我的解决方案将其修复为版本1.16.0

    您必须创建分till Service AccountClusterRoleBinding

    您可以使用以下命令简单地做到这一点:
    kubectl --namespace kube-system create sa tiller
    kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller

    只需创建分er
    helm init --override spec.selector.matchLabels.'name'='tiller',spec.selector.matchLabels.'app'='helm' --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | kubectl apply -f -

    关于linux - 运行`Error: could not find tiller`时`helm version`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58096041/

    36 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com