kur*_*kop 7 google-compute-engine google-cloud-platform google-kubernetes-engine
我在 GCP 中有两个项目:
为什么这个 Pod 无法连接?想法?
谢谢。
kur*_*kop 18
我在这里向谷歌报告了这个问题:https : //issuetracker.google.com/issues/111986281
他们说这是 Kubernetes 1.9 中的一个问题:
Beginning with Kubernetes version 1.9.x, automatic firewall rules have changed such that workloads in your Kubernetes Engine cluster cannot communicate with other Compute Engine VMs that are on the same network, but outside the cluster. This change was made for security reasons.
在下一个链接是解决方案:https : //cloud.google.com/kubernetes-engine/docs/troubleshooting#autofirewall
基本上:
首先,找到集群的网络:
gcloud container clusters describe [CLUSTER_NAME] --format=get"(network)"
然后获取用于容器的集群的 IPv4 CIDR:
gcloud container clusters describe [CLUSTER_NAME] --format=get"(clusterIpv4Cidr)"
最后为网络创建防火墙规则,以 CIDR 作为源范围,并允许所有协议:
gcloud compute firewall-rules create "[CLUSTER_NAME]-to-all-vms-on-network" --network="[NETWORK]" --source-ranges="[CLUSTER_IPV4_CIDR]" --allow=tcp,udp,icmp,esp,ah,sctp
| 归档时间: |
|
| 查看次数: |
5243 次 |
| 最近记录: |