0

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)?

  • FWIW, I'm having trouble doing any GKE deployments ATM using Deployment Manager, as of 2017/05/23. GIves a similar "cannot find field" error for every field I specify. This is for a brand new deployment, not an update. – nfirvine May 23 '17 at 21:57
  • @nfirvine GKE deployments via DM works fine for me (take a look at sample configs: gist.github.com/pbzdyl/2c3e93c54464a158beff1edb6c203a88). You can also take a look at github.com/GoogleCloudPlatform/deploymentmanager-samples/tree/… - deployment using jinja templates work for me too. The issue is once you deploy you cannot use DM to manage the size of you cluster. – Piotrek Bzdyl May 24 '17 at 12:59
  • Yes, you're right. I've figured out my problem. Most properties live under the cluster property instead of directly under properties – nfirvine May 24 '17 at 15:52
0

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.

0

This is a confusing error message from GCP. There is nothing wrong with your JSON, but rather the configuration state transition cannot be updated. It would be great if this produced an incompatible configuration update error.

In my case, we added scopes, which it turns out cannot be updated (added or removed).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.