部署管理器失败并出现神秘错误

时间:2016-10-20 21:53:20

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

所以,我有一个deployment manager配置,应该创建一个GKE集群。

以下是配置:

resources:
- name: mycluster
  type: container.v1.cluster
  properties:
    zone: us-central1-a
    cluster:
      name: mycluster
      description: hello mycluster
      masterAuth:
        username: admin
        password: password
      loggingService: logging.googleapis.com
      monitoringService: monitoring.googleapis.com
      addonsConfig:
        httpLoadBalancing:
          disabled: false
        horizontalPodAutoscaling:
          disabled: false
      nodePools:
        -
          name: default 
          initialNodeCount: 3
          config:
            machineType: n1-standard-1
            diskSizeGb: 100
            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     
            labels: 
              nodepool: default
          autoscaling:
            enabled: false
        -
          name: other 
          initialNodeCount: 2
          config:
            machineType: n1-standard-2
            diskSizeGb: 100
            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     
            labels: 
              nodepool: other
          autoscaling:
            enabled: false
      locations:
        - us-central1-a
        - us-central1-b
        - us-central1-c

当我运行gcloud deployment-manager deployments create mydeployment --config config.yaml时,部署会运行几分钟,然后失败并显示:

ERROR: (gcloud.deployment-manager.deployments.create) Error in Operation operation-xxxxxxxxxx-xxxxxxxxx-xxxxxxx-xxxxxxx:
errors:
- code: RESOURCE_ERROR
  location: /deployments/mydeployment/resources/mycluster
  message: 'Unexpected response from resource of type container.v1.cluster: 404 {"statusMessage":"Not
    Found","requestPath":null}'

群集确实在GKE中成功创建,我可以照常与它进行交互。使用gcloud deployment-manager deployments delete mydeployment删除失败的部署会删除部署,但会使群集保持不变。

我在这里做错了什么?我已经尝试过来自网络上的其他container.v1.cluster示例(例如https://github.com/mkarthikworld/caddy/tree/master/gke-caddy),但我们都因为同样的错误而失败了。

不知道还能在哪里看。

0 个答案:

没有答案