【问题标题】:K8s getting error after change gcloud sdk location on Macos在 Macos 上更改 gcloud sdk 位置后 K8s 出现错误
【发布时间】:2023-03-28 08:54:01
【问题描述】:

我刚刚连接到我的 kubernete。

但我需要将 gcloud 位置从 /Download 更改为 /usr 文件夹。

接下来,我运行install.sh 文件以更新.bash_profile 中的新位置。

然后我检查gcloud 命令。效果很好

但是当我运行kubectl get pod。错误显示。

Unable to connect to the server: error executing access token command "/Users/panda/Downloads/google-cloud-sdk/bin/gcloud config config-helper --format=json": err=fork/exec /Users/panda/Downloads/google-cloud-sdk/bin/gcloud: no such file or directory output= stderr=

嗯,如何更新gcloud sdk的位置来解决这个问题。

感谢您的帮助。

【问题讨论】:

    标签: kubernetes google-kubernetes-engine gcloud


    【解决方案1】:

    在您的 Kubeconfig 文件中(可能在 ~/.kube/config 中),您会看到它具有您的 gcloud CLI 的旧路径。使用新路径更新该文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-04-30
      • 2020-04-21
      • 2018-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-31
      相关资源
      最近更新 更多