'HelmCluster' object has no attribute 'status' when connecting to Dask release from GCE

214 Views Asked by At

I've deployed dask helm chart on gke, can access to the cluster with distributed.Client. Now I need to connect to dask cluster with dask_kubernetes.HelmCluster, but it raises this exception. Code works in my local environment, but raises exception in GCE. Cluster is already accessible with kubectl.

from dask_kubernetes import HelmCluster

cluster = HelmCluster(release_name='my-dask')
Environment:

reported exception:

RuntimeError: Missing dependency kubectl. Please install kubectl following the instructions for your OS. 
Exception ignored in: <function Cluster.__del__ at 0x7fa65a330b80>
Traceback (most recent call last):
  File "/home/michelv_romei/.local/lib/python3.8/site-packages/distributed/deploy/cluster.py", line 196, in __del__
    if self.status != Status.closed:
AttributeError: 'HelmCluster' object has no attribute 'status'

kubectl is already installed and it works fine.

Dask version: 2021.11.0

Python version: 3.8.0

Dask-kubernetes version: 0.11.0 and 2022.1.0

1

There are 1 best solutions below

0
On

Noting the corresponding GitHub issue, where the question author, @Vin B., was able to resolve this by:

Anyway, previously I installed kubectl via gcloud components, maybe it made kubectl unreachable from HelmCluster object, re-installing it from default repo fixed the problem.