【问题标题】:GKE Creation from Cloud Deployment Manager从 Cloud Deployment Manager 创建 GKE
【发布时间】:2018-12-10 06:49:45
【问题描述】:
Waiting for create [operation-1544424409972-57ca55456bd22-84bb0f13-64975fdc]...failed.
ERROR: (gcloud.deployment-manager.deployments.create) Error in Operation [operation-1544424409972-57ca55456bd22-84bb0f13-64975fdc]: errors:
- code: CONDITION_NOT_MET
  location: /deployments/infrastructure/resources/practice-gke-clusters->$.properties->$.cluster.name
  message: |-
    InputMapping for field [cluster.name] for method [create] could not be set from input, mapping was: [$.ifNull($.resource.properties.cluster.name, $.resource.name)
    ], and evaluation context was:
    {
      "deployment" : {
        "id" : 4291795636642362677,
        "name" : "infrastructure"
      },
      "intent" : "CREATE",
      "matches" : [ ],
      "project" : "resources-practice",
      "requestId" : "",
      "resource" : {
        "name" : "practice-gke-clusters",
        "properties" : {
          "initialNodeCount" : 1,
          "location" : "asia-east2-a",
          "loggingService" : "logging.googleapis.com",
          "monitoringService" : "monitoring.googleapis.com",
          "network" : "$(ref.practice-gke-network.selfLink)",
          "subnetwork" : "$(ref.practice-gke-network-subnet-1.selfLink)"
        },
        "self" : { }
      }
    }

当我尝试使用下面的 jinja 模板从部署管理器中创建 GKE 时,我总是会遇到这种情况

resources:
- name: practice-gke-clusters
  type: container.v1.cluster
  properties: 
    network: $(ref.practice-gke-network.selfLink)
    subnetwork: $(ref.practice-gke-network-subnet-1.selfLink)
    initialNodeCount: 1
    loggingService: logging.googleapis.com
    monitoringService: monitoring.googleapis.com
    location: asia-east2-a

【问题讨论】:

    标签: google-cloud-platform google-kubernetes-engine google-deployment-manager


    【解决方案1】:

    你不见了:

    properties:
        cluster:
            name: practice-gke-clusters
            initialNodeCount: 3
            nodeConfig:
                oauthScopes:
                - https://www.googleapis.com/auth/compute
                - https://www.googleapis.com/auth/devstorage.read_only
                - https://www.googleapis.com/auth/logging.write
                - https://www.googleapis.com/auth/monitoring
    

    根据需要修改initialNodeCountoauthScopes

    【讨论】:

    猜你喜欢
    • 2021-07-07
    • 2020-09-19
    • 2017-02-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-07
    • 2021-04-16
    相关资源
    最近更新 更多