google-kubernetes-engine - 错误 : gcloud crashed (WindowsError): [Error 3] The system cannot find the path specified: u'W:\\'

标签 google-kubernetes-engine gcloud

我使用的是 Google Cloud SDK 外壳。输入以下命令时:

gcloud container clusters get-credentials test-cluster

我收到以下错误:

ERROR: gcloud crashed (WindowsError): [Error 3] The system cannot find the path specified: u'W:\\'

我不确定为什么会这样。此命令应该只配置 kubectl 以使用我已经创建的名为“test-cluster”的集群,但它正在尝试查找驱动器 W:,我知道它不存在。

最佳答案

我的同事遇到了这个问题。他正在使用安装了 docker 桌面的 Windows 10。

DazWilkin 在评论中提到了关于 KUBECONFIG 环境变量的问题。

这让我们得以解决问题,谢谢 DazWilkin!

这是我们修复它的方式:

所以他安装了 docker desktop 但没有启用 Kubernetes。所以他丢失了 {HOME}/.kube/config 文件夹和文件。他在 docker desktop 中启用了 kubernetes,并在系统变量部分添加了环境变量。

所以变量:KUBECONFIG 和值:pathtohome.kube\config (C:\users\username.kube\config)

在 windows 的系统变量部分。

这解决了问题,此后命令运行正常。

关于google-kubernetes-engine - 错误 : gcloud crashed (WindowsError): [Error 3] The system cannot find the path specified: u'W:\\',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59570592/

相关文章:

mysql - 如何使用 GCE 在 Kubernetes 中安装 Mysql

c# - 积家服务 : How to configure on Google Kubernetes?

docker - GCP Cloud Run 无法从其他项目的 Artifact Registry 中拉取镜像

bash - 无需打开浏览器即可进行 gcloud 身份验证?

gcloud - 我可以使用服务帐户和用户凭据对 gcloud cli 进行身份验证吗?

kubernetes - 如何在 Stackdriver 日志中检测 GKE 自动升级节点

Kubernetes - 对于 Scale,当在扩展 pod (GKE) 时附加持久卷时 pod 处于挂起状态

docker - 如何为IP地址(不带域名)生成自签名证书?

docker - Kubectl : command not found on travis ci

php - Firestore : Key writes does not exist in the provided array