【问题标题】:Launching Kubernetes Multi Zone Cluster - Service unavailable 503 Backend Error启动 Kubernetes 多区域集群 - 服务不可用 503 后端错误
【发布时间】:2016-04-05 00:51:28
【问题描述】:

我正在按照this 教程在 GCE 上创建多区域 Kubernetes 部署。当我运行此命令时(如博客文章中所述):

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

我不确定为什么集群没有出现。任何指针将不胜感激。

谢谢!

【问题讨论】:

  • 我有同样的错误,没有任何环境变量,curl -sS https://get.k8s.io | bash。你的环境怎么样?
  • KUBERNETES_PROVIDER=gce KUBE_GCE_ZONE=us-central1-b kubernetes/cluster/kube-up.sh同样的错误
  • 我已设置 gcloud 以使用我的个人 gmail 帐户,但没有环境变量。

标签: google-compute-engine kubernetes gcloud


【解决方案1】:

这里的解决方法有效:

https://github.com/kubernetes/kubernetes/issues/23933#issuecomment-206561712

Add the following to $HOME/.boto:

[GSUtil]
prefer_api = xml

【讨论】:

    【解决方案2】:

    看起来我可以通过使用个人帐户与服务帐户来解决这个问题。使用服务帐户在 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
    

    【讨论】:

    • 嗨,我认为我没有使用服务帐户,当我执行 gcloud init 时,我看到我的帐户是“account = XXXX@YYYY.com”,这是一个 Google Apps 电子邮件地址帐户。
    • 我可以使用 Web 界面启动集群,然后可以使用 kubectl 来管理该集群,但脚本(问题中提到的)对我不起作用。
    猜你喜欢
    • 2014-08-31
    • 2017-08-23
    • 1970-01-01
    • 2021-01-07
    • 1970-01-01
    • 2016-02-22
    • 2017-01-14
    • 2017-02-26
    相关资源
    最近更新 更多