# Autoscaling in minikube does not work?

**URL:** <https://discuss.ray.io/t/autoscaling-in-minikube-does-not-work/1757>\
**Category:** Kubernetes\
**Created:** [April 16, 2021, 1:38pm UTC](https://discuss.ray.io/t/autoscaling-in-minikube-does-not-work/1757 "2021-04-16T13:38:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![asm582](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/asm582/32/669_2.png) [@asm582](https://discuss.ray.io/u/asm582)\
**Post date:** [April 16, 2021, 1:38pm UTC](https://discuss.ray.io/t/autoscaling-in-minikube-does-not-work/1757/1 "2021-04-16T13:38:04Z")

</div>

Hello, I have a minikube env which I have started with below resources as mentioned in the documentation:

minikube start --cpus=6 --memory=“4G”

I try to launch 150 tasks on the ray head node as below:

@ray.remote  
… def f():  
… time.sleep(1)

and I run the above function by executing the above function on the command line of head node as -

result = ray.get([f.remote() for \_ in range(150)])

I was hoping to see two workers spawned to execute tasks but I do not see two workers being spawned:

Below are the logs:

Usage:

1.0/1.0 CPU

0.00/0.271 GiB memory

0.00/0.135 GiB object\_store\_memory

Demands:

{‘CPU’: 1.0}: 148+ pending tasks/actors

2021-04-16 06:35:50,622 WARNING resource\_demand\_scheduler.py:711 – The autoscaler could not find a node type to satisfy the request: [{‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}, {‘CPU’: 1.0}]. If this request is related to placement groups the resource request will resolve itself, otherwise please specify a node type with the necessary resource [https://docs.ray.io/en/master/cluster/autoscaling.html#multiple-node-type-autoscaling](https://docs.ray.io/en/master/cluster/autoscaling.html#multiple-node-type-autoscaling).

2021-04-16 06:35:50,656 INFO autoscaler.py:325 –

======== Autoscaler status: 2021-04-16 06:35:50.656820 ========

Node status

* * *

Healthy:

1 head\_node

Pending:

(no pending nodes)

Recent failures:

(no failures)

Resources

* * *

Usage:

1.0/1.0 CPU

0.00/0.271 GiB memory

0.00/0.135 GiB object\_store\_memory

Demands:

{‘CPU’: 1.0}: 143+ pending tasks/actors

can you please comment why workers are not being spawned as a part of autoscaling in the current setup while running commands from the head node?

thanks

---

<div class="post-metadata">

**Author:** ![asm582](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/asm582/32/669_2.png) [@asm582](https://discuss.ray.io/u/asm582)\
**Post date:** [April 16, 2021, 1:41pm UTC](https://discuss.ray.io/t/autoscaling-in-minikube-does-not-work/1757/2 "2021-04-16T13:41:50Z")

</div>

Sorry missed the cluster launch command , I used the below command:

ray up ray/python/ray/autoscaler/kubernetes/example-full.yaml

As mentioned in the documentation here:

[https://docs.ray.io/en/master/cluster/kubernetes.html](https://docs.ray.io/en/master/cluster/kubernetes.html)

---

<div class="post-metadata">

**Author:** ![sangcho](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sangcho/32/425_2.png) [@sangcho](https://discuss.ray.io/u/sangcho)\
**Post date:** [April 16, 2021, 8:46pm UTC](https://discuss.ray.io/t/autoscaling-in-minikube-does-not-work/1757/3 "2021-04-16T20:46:44Z")

</div>

cc @ijrsvt Can you take a look at this?

---

<div class="post-metadata">

**Author:** ![Dmitri](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dmitri/32/657_2.png) [@Dmitri](https://discuss.ray.io/u/Dmitri)\
**Post date:** [April 18, 2021, 9:41pm UTC](https://discuss.ray.io/t/autoscaling-in-minikube-does-not-work/1757/4 "2021-04-18T21:41:08Z")

</div>

This looks like a bug in Ray 1.2.0 that was resolved here: [[autoscaler][kubernetes] autoscaling hotfix by DmitriGekhtman · Pull Request #14024 · ray-project/ray · GitHub](https://github.com/ray-project/ray/pull/14024)

I’d recommend using a more recent master version of Ray for Kubernetes features.
