这个 Google Kubernetes Engine 教程似乎不起作用。
https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app
$ gcloud beta container clusters create hello-cluster --num-nodes=3
WARNING: You invoked `gcloud beta`, but with current configuration Kubernetes Engine v1 API will be used instead of v1beta1 API.
`gcloud beta` will switch to use Kubernetes Engine v1beta1 API by default by the end of March 2018.
If you want to keep using `gcloud beta` to talk to v1 API temporarily, please set `container/use_v1_api` property to true.
But we will drop the support for this property at the beginning of May 2018, please migrate if necessary.
ERROR: (gcloud.beta.container.clusters.create) ResponseError: code=400, message=v1 API cannot be used to access GKE regional clusters. See http:/goo.gl/Vykvt2 for more information.
此命令似乎请求 GKE 区域集群
,但我不知道如何停止它。
最佳答案
通过添加 --zone=
选项效果很好。
gcloud container clusters create hello-cluster --num-nodes=3 --zone=asia-northeast1-a
您可以使用以下命令找到合适的区域名称;
gcloud compute zones list
NAME
和 REGION
略有不同。请提醒在 --zone=
选项中使用 NAME
。
您也可以在此可用区域和区域
文档中找到它。
https://cloud.google.com/compute/docs/regions-zones/#available
希望有帮助。
关于google-cloud-platform - ERROR : (gcloud. beta.container.clusters.create) ResponseError : code=400, message=v1 API 无法用于访问 GKE 区域集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49296145/