启动 Kubernetes 多区域集群 - 服务不可用 503 后端错误
Launching Kubernetes Multi Zone Cluster - Service unavailable 503 Backend Error
我正在按照 this 教程在 GCE 上创建多区域 Kubernetes 部署。当我运行这个命令时(如博客post中给出的):
curl -sS https://get.k8s.io | MULTIZONE=1 KUBERNETES_PROVIDER=gce
KUBE_GCE_ZONE=us-central1-a NUM_NODES=3 bash
我得到以下输出:
.
.
.
All components are up to date.
... calling kube-up
Your active configuration is: [default]
Project: ***
Zone: us-central1-a
Creating gs://kubernetes-staging-30021049c6
Creating gs://kubernetes-staging-30021049c6/...
ServiceException: 503 Backend Error
gcloud 配置如下:
Your active configuration is: [default]
[compute]
region = us-central1
zone = us-central1-a
[core]
account = ***@gmail.com
disable_usage_reporting = False
project = ***
[metrics]
command_name = gcloud.config.list
我不确定为什么集群没有出现。任何指针将不胜感激。
谢谢!
看来我可以通过使用个人帐户而不是服务帐户来解决这个问题。使用服务帐户在 GCE 上创建存储桶似乎是一个问题。
gcloud init
Welcome! This command will take you through the configuration of gcloud.
Your current configuration has been set to: [default]
Pick credentials to use:
[1] XXXXXXXX-compute@developer.gserviceaccount.com
[2] Log in with new credentials
Please enter your numeric choice: 2
You are running on a Google Compute Engine virtual machine.
It is recommended that you use service accounts for authentication.
You can run:
$ gcloud config set account ``ACCOUNT''
to switch accounts if necessary.
Your credentials may be visible to others with access to this
virtual machine. Are you sure you want to authenticate with
your personal account?
Do you want to continue (Y/n)? Y
此处的解决方法有效:
https://github.com/kubernetes/kubernetes/issues/23933#issuecomment-206561712
Add the following to $HOME/.boto:
[GSUtil]
prefer_api = xml
我正在按照 this 教程在 GCE 上创建多区域 Kubernetes 部署。当我运行这个命令时(如博客post中给出的):
curl -sS https://get.k8s.io | MULTIZONE=1 KUBERNETES_PROVIDER=gce
KUBE_GCE_ZONE=us-central1-a NUM_NODES=3 bash
我得到以下输出:
.
.
.
All components are up to date.
... calling kube-up
Your active configuration is: [default]
Project: ***
Zone: us-central1-a
Creating gs://kubernetes-staging-30021049c6
Creating gs://kubernetes-staging-30021049c6/...
ServiceException: 503 Backend Error
gcloud 配置如下:
Your active configuration is: [default]
[compute]
region = us-central1
zone = us-central1-a
[core]
account = ***@gmail.com
disable_usage_reporting = False
project = ***
[metrics]
command_name = gcloud.config.list
我不确定为什么集群没有出现。任何指针将不胜感激。
谢谢!
看来我可以通过使用个人帐户而不是服务帐户来解决这个问题。使用服务帐户在 GCE 上创建存储桶似乎是一个问题。
gcloud init
Welcome! This command will take you through the configuration of gcloud.
Your current configuration has been set to: [default]
Pick credentials to use:
[1] XXXXXXXX-compute@developer.gserviceaccount.com
[2] Log in with new credentials
Please enter your numeric choice: 2
You are running on a Google Compute Engine virtual machine.
It is recommended that you use service accounts for authentication.
You can run:
$ gcloud config set account ``ACCOUNT''
to switch accounts if necessary.
Your credentials may be visible to others with access to this
virtual machine. Are you sure you want to authenticate with
your personal account?
Do you want to continue (Y/n)? Y
此处的解决方法有效:
https://github.com/kubernetes/kubernetes/issues/23933#issuecomment-206561712
Add the following to $HOME/.boto:
[GSUtil]
prefer_api = xml