You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add instructions for accessing Dask Scheduler Dashboard from JupyterHub (#953)
* docs: add instructions for accessing Dask Scheduler dashboard from JupyterHub
* Add warning note to docs about using `c.ServerProxy.host_allowlist = lambda app, host: True` for accessing Dask Scheduler Dashboard from Jupyter notebook
---------
Co-authored-by: Lilian Montes <[email protected]>
In order to access the Dask Operator’s dashboard with `JupyterHub <https://z2jh.jupyter.org/en/stable/>`_, some additional configuration is needed.
164
+
165
+
Configuring JupyterHub Network Policy
166
+
"""""""""""""""""""""""""""""""""""""
167
+
168
+
The default JupyterHub configuration doesn’t allow communication between notebook pods and the Kubernetes API.
169
+
Consider that `kubeconfig` is already `configured for your notebook pods <https://kubernetes.dask.org/en/stable/operator_kubecluster.html#role-based-access-control-rbac>`_, and in order to enable the creation of ``DaskCluster`` resources directly from a notebook, you should add the following section to your JupyterHub ``values.yaml``:
$ kubectl delete po -n <your-namespace> jupyter-<your-user-name>
205
+
206
+
Creating Dask clusters is now possible directly from your notebook. See `KubeCluster <https://kubernetes.dask.org/en/latest/operator_kubecluster.html>`_ for more details.
207
+
208
+
Accessing Dask Scheduler Dashboard from JupyterLab
Then, apply your updated configuration and restart your notebook pod as previously described.
234
+
235
+
236
+
237
+
.. warning::
238
+
239
+
Setting `c.ServerProxy.host_allowlist = lambda app, host: True` is inherently insecure and may enable unintended access to other services within your network.
240
+
Ideally, you should modify this condition to restrict the host to your Dask Scheduler’s domain or service name (for instance, dask-cluster-name.default.svc.cluster.local) instead of allowing everything.
0 commit comments