gpt4 book ai didi

kubernetes - 为什么我在 alpha 集群创建期间收到 "(gcloud.alpha.container.clusters.create) ResponseError: code=404, message=Method not found."?

转载 作者:行者123 更新时间:2023-12-02 11:39:13 25 4
gpt4 key购买 nike

我正在创建一个 Kubernetes Alpha 集群 --enable-pod-security-policy仅在使用 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.

使用时 gcloud而不是 gcloud alpha对于没有 --enable-pod-security-policy 的上述命令集群已创建。我不确定,我认为没有人可以从应用程序反馈中判断错误在哪里。

最佳答案

根据 Cloud SDK release notes , --enable-pod-security-policy标志是在 191.0.0 版中添加的。

您应该通过运行以下命令确保您安装了最新的 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

关于kubernetes - 为什么我在 alpha 集群创建期间收到 "(gcloud.alpha.container.clusters.create) ResponseError: code=404, message=Method not found."?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59103984/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com