[英]Google cloud kubernetes unable to connect to cluster
I'm getting Unable to connect to the server: dial tcp <IP> i/o timeout
when trying to run kubectl get pods
when connected to my cluster in google shell. 我越来越
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
。 This started out of the blue without me doing any changes to my cluster setup. 无需我对集群设置进行任何更改,这一切都是从突然开始的。
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
This is the current cluster-config. 这是当前的群集配置。 I've run
gcloud container clusters get-credentials my-cluster --zone europe-north1-a --project <my project>
before doing this aswell. 在执行此操作
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>
。
I also noticed that my compute instances have lost their external IPs. 我还注意到,我的计算实例丢失了其外部IP。 In our staging environment, everything works as it should based on the same config.
在我们的暂存环境中,所有操作均基于相同的配置。
Any pointers would be greatly appreciated. 任何指针将不胜感激。
From what I can see of what you've posted you've turned on master authorized networks for the network <IP>
. 从我看到的发布内容中,您已经为网络
<IP>
启用了主授权网络。
If the IP address of the Google Cloud Shell ever changes that is the exact error that you would expect. 如果Google Cloud Shell的IP地址发生变化,这就是您所期望的确切错误。
As per https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#cloud_shell : you need to update the allowed IP address. 按照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.