Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 373
pkaramol Avatar asked May 23 '19 10:05

pkaramol


1 Answers

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

like image 126
Patrick W Avatar answered Sep 18 '22 18:09

Patrick W