Deployment manager fails with a cryptic error

10/20/2016

So, I have a deployment manager configuration that is supposed to create a GKE cluster.

Here is the configuration:

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

When I run gcloud deployment-manager deployments create mydeployment --config config.yaml the deployment runs for a few minutes and fails with:

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}'

The cluster actually does get successfully created in GKE, and I can interact with it as normal. Deleting the failed deployment with gcloud deployment-manager deployments delete mydeployment deletes the deployment, but leaves the cluster hanging around.

What am I doing wrong here? I've tried other container.v1.cluster samples from around the web (such as https://github.com/mkarthikworld/caddy/tree/master/gke-caddy), they all fail for me with the same error.

Not sure where else to look.

-- Marat Garafutdinov
google-cloud-platform
google-deployment-manager
google-kubernetes-engine
kubernetes

0 Answers