google-cloud-platform - ERROR : (gcloud. beta.container.clusters.create) ResponseError : code=400, message=v1 API 无法用于访问 GKE 区域集群

标签 google-cloud-platform google-kubernetes-engine kubernetes

这个 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

NAMEREGION 略有不同。请提醒在 --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/

相关文章:

php - 从 PHP 运行 gcloud 命令

google-cloud-platform - Cloud Scheduler 不适用于自定义 Cloud Run 域

google-cloud-platform - GKE 私有(private)集群中 --master-ipv4-cidr 的 CIDR 范围

nginx - 将 Google Cloud Storage Bucket 与 GCE LoadBalancer 一起使用...不在主机和路径中

kubernetes - 为什么Nginx Ingress Minikube插件hostPort可以工作,而hostPort不能用于其他任何插件?

google-cloud-platform - Node Express REST 托管在 Google Cloud Run 中

google-cloud-platform - GCP 外部 IP 地址费用

kubernetes - kubectl --token=$TOKEN 没有使用 token 的权限运行

redis - 访问 Google Kubernetes Engine 上的 Redis 集群

docker - 更改 k8s Pod 的入口点,但保留 CMD