7
votes

I create cluster on Google Kubernetes Engine with Cluster Autoscaler option enabled.
I want to config the scaling behavior such as --scale-down-delay-after-delete according to https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md .

But I found no Pod or Deployment on kube-system which is cluster autoscaler.

Anyone has ideas?


Edit: I am not saying Horizontal Pod Autoscaler.

And I hope I can configure it as like this :

$ gcloud container clusters update cluster-1 --enable-autoscaling --scan-interval=5 --scale-down-unneeded-time=3m
ERROR: (gcloud.container.clusters.update) unrecognized arguments:
  --scan-interval=5
  --scale-down-unneeded-time=3m
3
I didn't quite understand your question, but for my understand I guess you are looking for kubernetes.io/docs/tasks/run-application/…iraycd
cluster autoscaler (GCE layer... scales up and down the running GCE VM instances) vs. horizontal pod autoscaler (GKE layer... scales up and down the replicas in pod deployments)bartimar
I mean Cluster Autoscaler, it's an option on GKE. and its more about cluster than horizontal pod autoscaler.WeiChing 林煒清
Did you manage to find a solution to this by any chance @WeiChingLin?Chris Stryczynski
I've asked this question here as well: github.com/kubernetes/autoscaler/issues/966Chris Stryczynski

3 Answers

4
votes

It is not possible according to https://github.com/kubernetes/autoscaler/issues/966

Probably because there is no way to access the executable (which it seems to be) on GKE.

You can't even view the logs of the autoscaler on GKE: https://github.com/kubernetes/autoscaler/issues/972

0
votes

One way is to not enable the GKE autoscaler, and then manually install it on a worker node - per the project's docs:

Users can put it into kube-system namespace (Cluster Autoscaler doesn't scale down node with non-mirrored kube-system pods running on them) and set a priorityClassName: system-cluster-critical property on your pod spec (to prevent your pod from being evicted).

https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler#deployment

I would also think you could annotate the autoscaler pod(s) with the following:

"cluster-autoscaler.kubernetes.io/safe-to-evict": "false"

-1
votes

If i correclty understand you need this:

Check your deployments name by:

kubectl get deployments

And autoscale it by:

kubectl autoscale deployment your_deployment_name --cpu-percent=100 --min=1 --max=10