Hello guys, I have a problem to connect to my existing dask cluster ```my_flow.with_options( ...
a
Hello guys, I have a problem to connect to my existing dask cluster
Copy code
my_flow.with_options(
        task_runner=DaskTaskRunner(
            address="<tls://10.4.83.2:8786>"
        )
Log:
Copy code
prefect.task_runner.dask - Connecting to an existing Dask cluster at <tls://10.4.83.2:8786>
17:20:30.497 | ERROR   | Flow run 'jolly-griffin' - Crash detected! Execution was interrupted by an unexpected exception: TypeError: TLS expects a `ssl_context` argument of type ssl.SSLContext (perhaps check your TLS configuration?) Instead got None
What do I wrong? Dask cluster running on Kubernetes managed with Dask Gateway.
m
Hey @Aleksandr Liadov I'm not super familiar with Dask but I think you still need to pass some additional parameters to the DaskTaskRunner to access tls/ssl connections https://distributed.dask.org/en/latest/tls.html has more information on what those parameters are, I think you should be able to pass theses in as client kwargs on the task runner.
a
Yes, I have found also this solution 🙂 For someone who’ll have trouble:
Copy code
task_runner=DaskTaskRunner(
    address=cluster_dask.scheduler_info["address"],
    client_kwargs={"security": cluster_dask.security},
)