Google Cloud Deployment Manager and resources changes

google-cloud-platformgoogle-compute-engine

I would like to deploy an application in Google Cloud. It would require the following Google Cloud components:

  • Google Container Engine (so I can run an application inside Kubernetes cluster)
  • Google Compute Engine persistent disk (attached to the application Kubernetes pods)
  • Kubernetes deployment (containing the application running in the pods)

I am evaluating Deployment Manager as a tool for infrastructure as code approach.

Currently I have found following issues:

Changing Container Engine cluster size

Change Container Engine cluster size in my Deployment Manager yaml template cannot be applied with:

gcloud deployment-manager deployments update <deployment-name> --config <deployment-config.yml>

fails with:

{"ResourceType":"container.v1.cluster","ResourceErrorCode":"400","ResourceErrorMessage":{"code":400,"message":"Invalid
JSON payload received. Unknown name \"cluster\": Cannot find
field.","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"description":"Invalid
JSON payload received. Unknown name \"cluster\": Cannot find
field."}]}],"statusMessage":"Bad
Request","requestPath":"https://container.googleapis.com/v1/projects/1013690875001/zones/europe-west1-b/clusters/dev-cluster"}}

Resizing persistent disk size

When I change the disk size in my template and try to apply the change (again with gcloud deployment-manager deployments update command) I am also getting an error:

No method found to update field 'sizeGb' on resource
'my-data-storage' of type 'compute.v1.disk'. The resource may need
to be recreated with the new field.

Question

I would think the operations describe above are ones of the most common one would apply to the environment and I am surprised they are not supported.

Am I misunderstanding how Deployment Manager should be used or it just doesn't provide the features I need? How should I manage such environment changes so they can be tracked in source control (instead of imperative commands like cloud compute disks resize)?

Best Answer

It looks that the first case (resizing cluster) is an issue already reported to Google: Updating Container Engine properties results in 400: JSON payload received. Unknown name "cluster"

For the second one I have also opened an issue: Deployment Manager doesn't support persistent disk resizing


Update

The issue with resizing persistent disk has been resolved.

Related Topic