簡體   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