【问题标题】:Access GCP Cloud DNS from pods on GKE从 GKE 上的 pod 访问 GCP Cloud DNS
【发布时间】:2016-09-27 09:13:59
【问题描述】:
【问题讨论】:
标签:
kubernetes
google-cloud-platform
google-kubernetes-engine
lets-encrypt
google-cloud-dns
【解决方案1】:
Google Cloud DNS API 的 changes.create call 需要 https://www.googleapis.com/auth/ndev.clouddns.readwrite 或 https://www.googleapis.com/auth/cloud-platform 范围,在 GKE 集群上默认情况下两者均未启用。
您可以通过运行以下命令将新的Node Pool 添加到具有 DNS 范围的集群:
gcloud container node-pools create np1 --cluster my-cluster --scopes https://www.googleapis.com/auth/ndev.clouddns.readwrite
或者,您可以通过将--scopes 标志传递给gcloud container clusters create 或在Cloud Console 中的New Cluster dialog 中,点击“更多”,然后设置必要的范围来创建一个具有所需范围的全新集群范围为“已启用”。