简体   繁体   English

Google Cloud Kubernetes无法连接到集群

[英]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.

相关问题 Google Cloud Kubernetes集群无法连接到节点或删除吗? - Google Cloud Kubernetes cluster can not connect to nodes or delete? 如何将谷歌云功能连接到kubernetes集群中的cassandra数据库 - How to connect a google cloud function to cassandra database in kubernetes cluster 无法在Google Kubernetes Engine上创建Kubernetes集群 - Unable to create Kubernetes cluster on Google Kubernetes Engine 如何连接到 Google Cloud SQL,其中 python 的 pymysql 作为 Kubernetes 集群中运行的 dockerized 容器的一部分运行? - How to connect to Google Cloud SQL with python's pymysql running as part of a dockerized container running in a Kubernetes cluster? 为什么Kubernetes集群在VM实例上Google Cloud无法将主机与NodePort连接? - Why Kubernetes cluster on VM instances Google Cloud can't connect host with NodePort? 如何通过 Google Cloud Classic VPN 从外部网络连接到 Kubernetes 工作负载集群 IP? - How can i connect to a Kubernetes Workload Cluster IP from an external network via a Google Cloud Classic VPN? 无法将工作节点连接到kubernetes集群 - Unable to connect worker node to kubernetes cluster 无法kubectl连接我的kubernetes集群 - Unable to kubectl connect my kubernetes cluster 限制对Google Cloud Platform上的kubernetes集群的访问 - Limit access to a a kubernetes cluster on google cloud platform 在 Google Cloud 上的何处配置 Kubernetes Cluster Autoscaler? - Where to config the Kubernetes Cluster Autoscaler on Google Cloud?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM