gpt4 book ai didi

macos - 在Mac OS X和Tiller上安装Helm 2.9

转载 作者:行者123 更新时间:2023-12-02 12:13:44 25 4
gpt4 key购买 nike

我正在尝试在minikube上本地安装旧版本的 Helm 和分till,并继续获取Error: error installing: the server could not find the requested resource erorr消息-不知道如何解决该问题;

我执行的步骤:

  • 根据此站点:https://medium.com/@nehaguptag/installing-older-version-of-helm-downgrading-helm-8f3240592202
  • $ brew unlink kubernetes-helm
    $ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/78d64252f30a12b6f4b3ce29686ab5e262eea812/Formula/kubernetes-helm.rb
    $ brew switch kubernetes-helm 2.9.1
  • 不仅仅是:minikube start
  • 设置kubectl以使用minikube:kubectl config set-context minikube
  • 更改docker以在minikube上运行/下载图像:eval $(minikube docker-env)

  • 我收到的错误消息是:
    MacBook-Pro% helm init
    Creating /Users/rwalas/.helm
    Creating /Users/rwalas/.helm/repository
    Creating /Users/rwalas/.helm/repository/cache
    Creating /Users/rwalas/.helm/repository/local
    Creating /Users/rwalas/.helm/plugins
    Creating /Users/rwalas/.helm/starters
    Creating /Users/rwalas/.helm/cache/archive
    Creating /Users/rwalas/.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 /Users/rwalas/.helm.
    Error: error installing: the server could not find the requested resource

    **更新

    该错误报告有一点帮助,但问题仍然存在: https://github.com/helm/helm/issues/6374

    当前的解决方法似乎是这样的:
    helm init --output yaml > tiller.yaml并更新tiller.yaml:

    更改为apps / v1
    添加选择器字段
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    creationTimestamp: null
    labels:
    app: helm
    name: tiller
    name: tiller-deploy
    namespace: kube-system
    spec:
    replicas: 1
    strategy: {}
    selector:
    matchLabels:
    app: helm
    name: tiller

    和:
  • kubectl apply -f tiller.yaml
  • 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 -


  • 解决:

    这些步骤最终对我有所帮助,我建议所有想要使用旧版 Helm 的人使用
    # 1. Check which binary you would like: https://github.com/helm/helm/releases and copy address
    wget -c https://get.helm.sh/helm-v3.0.2-darwin-amd64.tar.gz
    tar -zxvf helm-v3.0.2-darwin-amd64.tar.gz
    rm -rf ~/.helm
    mv <directory_of_download>/Darwin-AMD64<or whatever other name it was named>/helm /usr/local/bin/helm

    最佳答案

    有两件事要考虑:

  • 检查您想要的二进制文件:https://github.com/helm/helm/releases并复制地址wget -c https://get.helm.sh/helm-v3.0.2-darwin-amd64.tar.gz
    tar -zxvf helm-v3.0.2-darwin-amd64.tar.gz
    rm -rf ~/.helm
    mv <directory_of_download>/Darwin-AMD64<or whatever other name it was named>/helm /usr/local/bin/helm
  • 最新版本的K8s在安装Helm时遇到了一些问题。启动minikube时,请尝试使用1.15.4版本的K8s,因为这是已批准的解决方法。 minikube delete,而不是minikube start --kubernetes-version=1.15.4。之后掌 Helm init。
  • 关于macos - 在Mac OS X和Tiller上安装Helm 2.9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59626834/

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