【问题标题】:Access GCP Cloud DNS from pods on GKE从 GKE 上的 pod 访问 GCP Cloud DNS
【发布时间】:2016-09-27 09:13:59
【问题描述】:

我正在调查这个letsencrypt控制器(https://github.com/tazjin/kubernetes-letsencrypt)。

它要求 pod 有权更改 Cloud DNS 中的记录。我认为在 GKE 上运行 pod 时,我可以使用默认服务帐户获得该访问权限,但请求失败。我需要做什么才能允许 pod 访问 Cloud DNS?

【问题讨论】:

    标签: 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.readwritehttps://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 中,点击“更多”,然后设置必要的范围来创建一个具有所需范围的全新集群范围为“已启用”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-10-24
      • 2018-11-21
      • 1970-01-01
      • 2018-06-02
      • 1970-01-01
      • 1970-01-01
      • 2021-04-14
      相关资源
      最近更新 更多