Kubernetes,无法连接到服务器:EOF

时间:2019-08-16 14:39:19

标签: kubernetes google-cloud-platform kubectl

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。我的计算机通过公司代理访问Internet。我如何以及在哪里可以为kubectl提供证书文件,以便它可以对所有请求使用证书?谢谢。

1 个答案:

答案 0 :(得分:0)

如果在一定时间内没有收到来自kubectl API调用的响应,则会得到EOF(默认情况下,空闲时间设置为300秒)。

尝试增加集群空闲时间,或者也许您可能需要VPN来访问这些Pod(类似的东西)