【问题标题】:Kubernetes, Unable to connect to the server: EOFKubernetes,无法连接到服务器:EOF
【发布时间】: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


【解决方案1】:

如果在特定时间内没有来自 kubectl API 调用的响应(空闲时间默认设置为 300 秒),您将收到 EOF。

尝试增加集群空闲时间,或者您可能需要 VPN 来访问这些 pod(类似那些)

【讨论】:

    猜你喜欢
    • 2022-06-20
    • 1970-01-01
    • 1970-01-01
    • 2018-08-02
    • 1970-01-01
    • 1970-01-01
    • 2018-09-03
    • 1970-01-01
    • 2017-09-08
    相关资源
    最近更新 更多