i have requirement in have stop instance group during night hours , restart in morning. there anyway can stop instance group few hours. console can change autoscaling off , set number of instances 0 cant find option api. please suggest
you can use:
gcloud compute instance-groups managed stop-autoscaling name [--zone zone]
and
gcloud compute instance-groups managed set-autoscaling name \ --max-num-replicas max_num_replicas [--zone zone]
note stop-autoscaling
not bring down number of instances 0 you, need set-autoscaling --max-num-replicas
.
the corresponding rest api instancegroupmanagers: resize.
Comments
Post a Comment