繁体   English   中英

Google Cloud Kubernetes无法连接到集群

[英]Google cloud kubernetes unable to connect to cluster

我越来越Unable to connect to the server: dial tcp <IP> i/o timeout在尝试运行kubectl get pods时,在尝试连接到Google Shell中的集群时Unable to connect to the server: dial tcp <IP> i/o timeout 无需我对集群设置进行任何更改,这一切都是从突然开始的。

gcloud beta container clusters create tia-test-cluster \
    --create-subnetwork name=my-cluster\
    --enable-ip-alias \
    --enable-private-nodes \
    --master-ipv4-cidr <IP> \
    --enable-master-authorized-networks \
    --master-authorized-networks <IP> \
    --no-enable-basic-auth \
    --no-issue-client-certificate \
    --cluster-version=1.11.2-gke.18 \
    --region=europe-north1 \
    --metadata disable-legacy-endpoints=true \
    --enable-stackdriver-kubernetes \
    --enable-autoupgrade

这是当前的群集配置。 在执行此操作gcloud container clusters get-credentials my-cluster --zone europe-north1-a --project <my project>我已经运行了gcloud container clusters get-credentials my-cluster --zone europe-north1-a --project <my project>

我还注意到,我的计算实例丢失了其外部IP。 在我们的暂存环境中,所有操作均基于相同的配置。

任何指针将不胜感激。

从我看到的发布内容中,您已经为网络<IP>启用了主授权网络。

如果Google Cloud Shell的IP地址发生变化,这就是您所期望的确切错误。

按照https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#cloud_shell :您需要更新允许的IP地址。

gcloud container clusters update tia-test-cluster \
    --region europe-north1 \
    --enable-master-authorized-networks \
    --master-authorized-networks [EXISTING_AUTH_NETS],[SHELL_IP]/32

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM