How can an autoscaling managed instance group be added to a target pool?
It's easy enough to add existing instances to a target pool via
$ gcloud compute target-pools create mypool --region us-central1
$ gcloud compute target-pools add-instances mypool \
--instances existing-instance1 existing-instance2 --zone us-central1-b
However, I want all the instances that appear in my autoscaling group to automatically be added to my target pool.
You can use gcloud compute instance-groups managed set-target-pools command to set the target pool for an existing manged instance group. You can refer to this link for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With