【发布时间】:2019-08-16 14:39:19
【问题描述】:
kubectl 的环境:Windows 10。
Kubectl 版本:https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/windows/amd64/kubectl.exe
你好。我刚刚在 Google Cloud Platform 上安装了 Kubernetes 集群。然后应用下一个命令:
gcloud container clusters get-credentials my-cluster --zone europe-west1-b --project my-project
它成功地在%UserProfile%\.kube\config 添加了凭据
但是当我尝试kubectl get pods 时,它会返回Unable to connect to the server: EOF。我的电脑通过公司代理访问互联网。我如何以及在哪里可以为 kubectl 提供证书文件,以便它可以将证书用于所有请求?谢谢。
【问题讨论】:
-
我假设您已经安装了 Google Closud SDK。尝试删除您安装的 kubectl,并通过运行
gcloud components install kubectl安装与 SDK 结合的 kubectl。然后再次运行您引用的命令并尝试再次获取 pod。
标签: kubernetes google-cloud-platform kubectl