Dask Auto Scaler failing to create

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

[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

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

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

1 Like