pkaramol
pkaramol

Reputation: 19422

Bug in GCP: Unable to change instance template for instance group

I am trying to set a new template for an GKE instance group as proposed by this tutorial, but getting the following error:

I copied an existing template, just modified a label on it, saved it and then run:

$ gcloud compute instance-groups managed set-instance-template gke-some-nodepool1-1436e076-grp --template gke-some-nodepool1-7bdaa55f-1 --zone=us-east4-b
ERROR: (gcloud.compute.instance-groups.managed.set-instance-template) Could not fetch resource:
 - Invalid resource usage: 'Secondary ranges specified in InstanceTemplate must be the same as already set on Instance Group Manager. Expected: sre-inception-cluster-range Actual: '.

It turns out that the new (cloned) template does NOT have the Alias IP Ranges field set (as does the original template).

Seems like as bug on the template copying mechanism?

Upvotes: 5

Views: 1755

Answers (1)

Patrick W
Patrick W

Reputation: 4909

If you are using VPC-Native clusters, you'll notice that there is a "Alias IP ranges" field that does not specify a specific range. When you copy the template, rather than keeping the same value, the field is change to select a corresponding subnet. You'll have to manually change this field to match the value of the original template.

This may be a limitation of how the "copy template" function works, but it's definitely unexpected. Worth filing a case with Google support using the Public Issue Tracker

Upvotes: 7

Related Questions