How to update all machines in an instance group on Google Cloud Platform?

1.3k views Asked by At

I have multiple machines managed by auto scaling in Google Compute Engine. I would like to redeploy all my machines (create new ones based on the same instance template and delete all the old ones). I do not want any service interruption.

How can I do that?

2

There are 2 answers

1
Kamran On

You can use the following gcloud command to recreate the existing VMs using the new or the same template whichever is set to your managed group:

$ gcloud compute instance-groups managed recreate-instances NAME --instances=INSTANCE
1
poiuytrez On