首页 > 解决方案 > ERROR: gcloud crashed (WindowsError): [Error 3] The system cannot find the path specified: u'W:\\'

问题描述

我正在使用 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:。

标签: google-kubernetes-enginegcloud

解决方案


我的同事遇到了这个问题。他正在使用安装了 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的系统变量部分。

这解决了问题,之后命令运行良好。


推荐阅读