Networking 在Google容器引擎上使用deny all时更正出口规则

Networking 在Google容器引擎上使用deny all时更正出口规则,networking,kubernetes,google-cloud-platform,google-kubernetes-engine,Networking,Kubernetes,Google Cloud Platform,Google Kubernetes Engine,我正在试图弄清楚谷歌容器引擎要正常运行必须允许哪些出口规则 我目前正在使用以下规则: gcloud beta compute firewall-rules create "outbound-deny" \ --action DENY --rules all --direction "EGRESS" --priority "65531" \ --network "secure-vpc" --destination-ranges "0.0.0.0/0" gcloud beta com

我正在试图弄清楚谷歌容器引擎要正常运行必须允许哪些出口规则

我目前正在使用以下规则:

gcloud beta compute firewall-rules create "outbound-deny" \
    --action DENY --rules all --direction "EGRESS" --priority "65531" \
    --network "secure-vpc" --destination-ranges "0.0.0.0/0"
gcloud beta compute firewall-rules create "outbound-internal" \
    --allow all --direction "EGRESS" --priority "65530" \
    --network "secure-vpc" --destination-ranges "10.0.0.0/8"

有了这些规则,在此网络中创建群集将失败。它确实创建了所有的机器、网络规则等。kubernetes群集仍然不会将节点报告为活动节点。

我认为您需要允许到K8s Master的通信量。要检索它,请执行以下操作:

MASTER_IP=$(gcloud container clusters describe $CLUSTER --zone $ZONE --format="value(endpoint)")