无法在Google Kubernetes Engine上部署Kubernetes Federation

时间:2018-10-16 09:36:13

标签: kubernetes google-kubernetes-engine

我正在尝试按照https://kubernetes.io/docs/tasks/federation/set-up-cluster-federation-kubefed/中的说明在GKE上设置Kubernetes Federation。我的节点中的Kubernetes版本是v1.9.7-gke.6。我运行了命令kubefed init federation1 --host-cluster-context=[CONTEXT] --dns-provider="google-clouddns" --dns-zone-name=[DNS_ZONE]。这将永远停留在Waiting for federation control plane to come up........

检查apiserver容器的状态,我看到此错误消息:

Failed to pull image "gcr.io/k8s-jkns-e2e-gce-federation/fcp-amd64:v1.10.0-alpha.0": rpc error: code = Unknown desc = Error response from daemon: Get https://gcr.io/v2/k8s-jkns-e2e-gce-federation/fcp-amd64/manifests/v1.10.0-alpha.0: denied: Token exchange failed for project 'k8s-jkns-e2e-gce-federation'. Please enable or contact project owners to enable the Google Container Registry API in Cloud Console at https://console.cloud.google.com/apis/api/containerregistry.googleapis.com/overview?project=k8s-jkns-e2e-gce-federation before performing this operation.

有人知道如何解决这个问题吗?谢谢。

1 个答案:

答案 0 :(得分:2)

似乎您正在尝试访问必须先启用的API。 您能检查一下是否如下: enter image description here

enter image description here