Enable autoscaling when creating a GKE cluster

I am trying to create an autoscale container cluster on GKE. When I use the --enable-autoscaling option (for example, the documentation points here: https://cloud.google.com/container-engine/docs/clusters/operations#create_a_cluster_with_autoscaling ):

$ gcloud container clusters create mycluster --zone $GOOGLE_ZONE --num-nodes=3 --enable-autoscaling --min-nodes=2 --max-nodes=5

but the MIG (Managed Instanced Group) does not appear as โ€œauto-scaledโ€, as shown by both the web interface and the result of the following command:

$ gcloud compute instance-groups managed list
NAME             SIZE   TARGET_SIZE   AUTOSCALED
gke-mycluster... 3      3             no

Why?

Then I tried the other method indicated in the kubernetes docs ( http://kubernetes.io/docs/admin/cluster-management/#cluster-autoscaling ), but got the error caused by '= true' obviously:

$ gcloud container clusters create mytestcluster --zone=$GOOGLE_ZONE --enable-autoscaling=true --min-nodes=2 --max-nodes=5 --num-nodes=3
usage: gcloud container clusters update  NAME [optional flags]
ERROR: (gcloud.container.clusters.update) argument --enable-autoscaling: ignored explicit argument 'true'

? gcloud:

$ gcloud version
Google Cloud SDK 120.0.0
beta 2016.01.12
bq 2.0.24
bq-nix 2.0.24
core 2016.07.29
core-nix 2016.03.28
gcloud 
gsutil 4.20
gsutil-nix 4.18
kubectl 
kubectl-linux-x86_64 1.3.3

: 'on' :

$ gcloud container clusters describe  mycluster | grep auto -A 3
- autoscaling:
    enabled: true
    maxNodeCount: 5
    minNodeCount: 2

, ?

+4
1

Kubernetes Managed Instance Group. cluster-autoscaler Kubernetes, Kubernetes . autoscaler, .

PR, . , !

+1

Source: https://habr.com/ru/post/1654359/


All Articles