Constraint constraints/compute.vmExternalIpAccess violated for project
這項異動只會影響公開 GKE 叢集,包括 GKE Autopilot 叢集。
建立公開 GKE 叢集時,構成叢集工作站節點的基礎 Compute Engine VM 會指派外部 IP 位址。如果您將機構政策限制 constraints/compute.vmExternalIpAccess 設為 Deny All,或在機構、資料夾或專案層級將外部 IP 位址限制為特定 VM 執行個體,則政策會禁止 GKE 工作站節點取得外部 IP 位址,導致叢集建立失敗。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-01 (世界標準時間)。"],[],[],null,["# Troubleshoot cluster creation\n\n[Autopilot](/kubernetes-engine/docs/concepts/autopilot-overview) [Standard](/kubernetes-engine/docs/concepts/choose-cluster-mode)\n\n*** ** * ** ***\n\nThis page shows you how to resolve issues with creating clusters in\nGoogle Kubernetes Engine (GKE).\n\nFor general issues with a Kubernetes cluster, see\n[Troubleshooting Clusters](https://kubernetes.io/docs/tasks/debug/debug-cluster/)\nin the Kubernetes documentation.\n\nError: Constraint constraints/compute.vmExternalIpAccess violated\n-----------------------------------------------------------------\n\nAn error similar to the following can occur when you try to create a public\nGKE cluster: \n\n Constraint constraints/compute.vmExternalIpAccess violated for project\n\nThis only affects public GKE clusters, including\nGKE Autopilot clusters.\n\nWhen you create public GKE clusters, the underlying\nCompute Engine VMs, which make up the worker nodes of this cluster, have\n[external IP addresses](/compute/docs/ip-addresses#externaladdresses) assigned.\nIf you configure the organization policy constraint\n[`constraints/compute.vmExternalIpAccess`](/resource-manager/docs/organization-policy/org-policy-constraints)\nto `Deny All` or to restrict external IP addresses to specific VM instances at\nthe organization, folder, or project level, then the\npolicy prevents the GKE worker nodes from obtaining external IP\naddresses, which results in cluster creation failure.\n\nTo find the logs of the cluster creation operation, you can review the\n[GKE Cluster Operations Audit Logs](/kubernetes-engine/docs/how-to/audit-logging) using\n[Logs Explorer](/logging/docs/view/logs-explorer-interface) with a search\nquery similar to the following: \n\n resource.type=\"gke_cluster\"\n logName=\"projects/test-last-gke-sa/logs/cloudaudit.googleapis.com%2Factivity\"\n protoPayload.methodName=\"google.container.v1beta1.ClusterManager.CreateCluster\"\n resource.labels.cluster_name=\"\u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e\"\n resource.labels.project_id=\"\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\"\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eCLUSTER_NAME\u003c/code\u003e\u003c/var\u003e: the name of the cluster that wasn't created.\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ePROJECT_ID\u003c/code\u003e\u003c/var\u003e: your project ID.\n\nTo resolve this issue, ensure that the effective policy for the constraint\n`constraints/compute.vmExternalIpAccess` is `Allow All` on the project where you\nare trying to create a GKE public cluster. For information on\nworking with this constraint, see\n[Restricting external IP addresses to specific VM instances](/compute/docs/ip-addresses/configure-static-external-ip-address#disableexternalip).\n\nAfter setting the constraint to `Allow All`, delete the failed cluster and\ncreate a new cluster. This is required because repairing the failed cluster is\nnot possible.\n\nWhat's next\n-----------\n\n- If you can't find a solution to your problem in the documentation, see\n [Get support](/kubernetes-engine/docs/getting-support) for further help,\n including advice on the following topics:\n\n - Opening a support case by contacting [Cloud Customer Care](/support-hub).\n - Getting support from the community by [asking questions on StackOverflow](http://stackoverflow.com/questions/tagged/google-kubernetes-engine) and using the `google-kubernetes-engine` tag to search for similar issues. You can also join the [`#kubernetes-engine` Slack channel](https://googlecloud-community.slack.com/messages/C0B9GKTKJ/) for more community support.\n - Opening bugs or feature requests by using the [public issue tracker](/support/docs/issue-trackers)."]]