# Dask Auto Scaler failing to create

**URL:** https://dask.discourse.group/t/dask-auto-scaler-failing-to-create/2035
**Category:** Deploying Dask
**Created:** [July 19, 2023, 2:59pm UTC](https://dask.discourse.group/t/dask-auto-scaler-failing-to-create/2035 "2023-07-19T14:59:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![LuanAraldi](https://yyz1.discourse-cdn.com/flex035/user_avatar/dask.discourse.group/luanaraldi/32/1089_2.png) [@LuanAraldi](https://dask.discourse.group/u/LuanAraldi)
#### Post date: [July 19, 2023, 2:59pm UTC](https://dask.discourse.group/t/dask-auto-scaler-failing-to-create/2035/1 "2023-07-19T14:59:26Z")

</div>

Hey everyone! I’m having some issues using the dask operator on a k8s cluster, when trying to setup the Dask Auto Scaler it fails with this message

```auto
[2023-07-19 14:51:40,420] kopf.objects [ERROR] [dask-operator/autoscaled] Handler 'daskautoscaler_create' failed with an exception. Will retry.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/kopf/_core/actions/execution.py", line 276, in execute_handler_once
    result = await invoke_handler(
  File "/usr/local/lib/python3.10/site-packages/kopf/_core/actions/execution.py", line 371, in invoke_handler
    result = await invocation.invoke(
  File "/usr/local/lib/python3.10/site-packages/kopf/_core/actions/invocation.py", line 116, in invoke
    result = await fn(**kwargs) # type: ignore
  File "/usr/local/lib/python3.10/site-packages/dask_kubernetes/operator/controller/controller.py", line 841, in daskautoscaler_create
    autoscaler = await DaskAutoscaler(body)
  File "/usr/local/lib/python3.10/site-packages/kr8s/_objects.py", line 45, in __init__
    raise ValueError("resource must be a dict or a string")

```

Does anyone have any idea on what could be possibly going wrong?  
this is the autoscaler yaml that I’m using

```auto
apiVersion: kubernetes.dask.org/v1
kind: DaskAutoscaler
metadata:
  namespace: dask-operator
  name: autoscaled
spec:
  cluster: autoscaled
  minimum: 1 
  maximum: 5 

```

---

<div class="post-metadata">

### Author: ![jacobtomlinson](https://yyz1.discourse-cdn.com/flex035/user_avatar/dask.discourse.group/jacobtomlinson/32/1384_2.png) [@jacobtomlinson](https://dask.discourse.group/u/jacobtomlinson)
#### Post date: [July 19, 2023, 6:18pm UTC](https://dask.discourse.group/t/dask-auto-scaler-failing-to-create/2035/2 "2023-07-19T18:18:55Z")

</div>

I think this is a bug. Could you open an issue on GitHub?
