Google-cloud-ruby: ClusterManagerClient support for regional clusters

Created on 26 Sep 2018  路  8Comments  路  Source: googleapis/google-cloud-ruby

All 8 comments

I am not very familiar with the compute API, but I did find this link discussing how to create regional clusters:

https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster#regional

The link uses the gcloud CLI. It is possible this functionality is not yet available via the API. @dazuma @TheRoyalTnetennba, do you have more information about regional clusters? Or can you tag someone who would know?

@matti Does this answer your question?

@blowmage not really - I think API creation is available if (and when) gcloud works

The API itself does support regions. (In general, if the gcloud command line supports it, then the API supports it, since gcloud calls the API internally.) But the Ruby client is out of date and hasn't picked up the region-related changes. I'm investigating why.

Quick update on this. We found the internal issue that was preventing the client libraries from being updated to receive new service features for this service. It appears to be limited to container (GKE) service. The team is working on a fix now, and we hope to release an updated client in the next week or so.

@dazuma Any movement on this?

The GKE team is working on it internally. It's taking a bit longer than expected because of the number of changes. (The client is nearly a year out of date.) I'll contact the engineer involved and see if we can get an ETA.

Hi @matti, thank you for your patience on this. We just released google-cloud-container 0.3.0 which adds support for regional clusters.

The previous way to work with clusters was to provide the project_id and zone as positonal arguments in method calls:

require "google/cloud/container"

cluster_manager_client = Google::Cloud::Container.new(version: :v1)

project_id = "my-project"
zone = "us-west1"

response = cluster_manager_client.list_clusters(project_id, zone)

This will continue to work. However, to use regional clusters you must pass in the resource path using the name or parent named argument:

require "google/cloud/container"

cluster_manager_client = Google::Cloud::Container.new(version: :v1)

location_path = "projects/my-project/locations/my-location"

response = cluster_manager_client.list_clusters(nil, nil, parent: my-location_path)

The docs for this release are here. Thanks for opening the issue!

Was this page helpful?
0 / 5 - 0 ratings