簡體   English   中英

為什么我會收到“(gcloud.alpha.container.clusters.create) ResponseError: code=404, message=Method not found”。 在 alpha 集群創建期間?

[英]Why am I getting "(gcloud.alpha.container.clusters.create) ResponseError: code=404, message=Method not found." during alpha cluster creation?

我正在創建一個帶有--enable-pod-security-policy的 Kubernetes Alpha 集群,該集群僅在使用gcloud alpha而不是gcloud afaik 時可用。 我正在使用

$ gcloud alpha container clusters create cluster-name --machine-type=n1-standard-1 --no-enable-stackdriver-kubernetes --no-enable-autoupgrade --preemptible --enable-kubernetes-alpha --quiet --enable-pod-security-policy

由於

61 WARNING: Currently VPC-native is not the default mode during cluster creation. In the future, this will become the default mode and can be disabled using `--no-enable-ip-alias` flag. Use `--[no-]enable-ip-alias` flag to suppress this warning.
62 WARNING: Starting in 1.12, default node pools in new clusters will have their legacy Compute Engine instance metadata endpoints disabled by default. To create a cluster with legacy instance metadata endpoints disabled in the default node pool, run `clusters create` with the flag `--metadata disable-legacy-endpoints=true`.
63 WARNING: Your Pod address range (`--cluster-ipv4-cidr`) can accommodate at most 1008 node(s). 
64 ERROR: (gcloud.alpha.container.clusters.create) ResponseError: code=404, message=Method not found.

當在沒有--enable-pod-security-policy的情況下對上述命令使用gcloud而不是gcloud alpha ,會創建集群。 我不確定,我認為沒有人可以從應用程序反饋中判斷錯誤在哪里。

根據 Cloud SDK發行說明,在版本 191.0.0 中添加了--enable-pod-security-policy標志。

您應該通過運行以下命令確保您安裝了最新的 Cloud SDK:

$ gcloud components update

並使用beta關鍵字運行您的命令:

$ gcloud beta container clusters create cluster-name --machine-type=n1-standard-1 --no-enable-stackdriver-kubernetes --no-enable-autoupgrade --preemptible --enable-kubernetes-alpha --quiet --enable-pod-security-policy

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM