SteamClosedError when creating KubeCluster on Kubeflow
See original GitHub issueHi there,
I met this StreamClosedError when I created a cluster with
cluster = KubeCluster.from_yaml('worker-template.yaml')
on kubeflow jupyter notebook:
---------------------------------------------------------------------------
StreamClosedError Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/distributed/comm/tcp.py in read(self, deserializers)
183 try:
--> 184 n_frames = await stream.read_bytes(8)
185 n_frames = struct.unpack("Q", n_frames)[0]
StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
CommClosedError Traceback (most recent call last)
<ipython-input-4-1d49f9431640> in <module>
----> 1 cluster = KubeCluster.from_yaml('worker-template.yaml')
/opt/conda/lib/python3.7/site-packages/dask_kubernetes/core.py in from_yaml(cls, yaml_path, **kwargs)
309 d = yaml.safe_load(f)
310 d = dask.config.expand_environment_variables(d)
--> 311 return cls.from_dict(d, **kwargs)
312
313 @property
Assumed that the pod doesn’t have enough authorities to create new pods, I created a new role object jupyter-notebook
and configured new rolebinding as below (the pod using the default ServiceAccount default-editor
):
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
creationTimestamp: "2019-10-16T13:19:58Z"
name: default-editor
namespace: kubeflow-hong-zhu
ownerReferences:
- apiVersion: kubeflow.org/v1alpha1
blockOwnerDeletion: true
controller: true
kind: Profile
name: kubeflow-hong-zhu
uid: 8022a9fa-f017-11e9-ad0d-42010a840259
resourceVersion: "4025"
selfLink: /apis/rbac.authorization.k8s.io/v1/namespaces/kubeflow-hong-zhu/rolebindings/default-editor
uid: a6f95f59-f017-11e9-ad0d-42010a840259
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: jupyter-notebook
subjects:
- kind: ServiceAccount
name: default-editor
namespace: kubeflow-hong-zhu
This however, doesn’t solve the problem. Any thoughts?
Thanks 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:22 (8 by maintainers)
Top Results From Across the Web
Local Deployment | Kubeflow
This guide shows how to deploy Kubeflow Pipelines standalone on a local Kubernetes cluster using: kind; K3s; K3s on Windows Subsystem for ...
Read more >KubeCluster (classic) - Dask Kubernetes
To launch a Dask cluster on Kubernetes with KubeCluster you need to first configure your worker pod specification. Then create a cluster with...
Read more >Using Dask on KubeFlow with the Dask Kubernetes Operator
Creating Dask Clusters from within Notebooks. Let's head into the KubeFlow Notebooks tab on the left of the UI and launch ourselves a...
Read more >Accelerating ETL on KubeFlow with RAPIDS
Using RAPIDS on your KubeFlow cluster empowers you to GPU-accelerate your ETL work in both your interactive sessions and ETL pipelines.
Read more >Kubeflow — RAPIDS Deployment Documentation ...
Next, create a Dask cluster using the KubeCluster class. Set the container image to match the one used for your notebook environment and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I came across (I think) the same issue. It seems to depend on the version of Istio at least to some extent. On on cluster with
istio 1.2.6
I have the error (trace below), but on a similar cluster withIstio 1.3.8
and the same resources it works fine!Relevant versions:
I created a service account/role/rolebinding exactly as specified in the docs. I am using my own image instead of the daskdev one and it all worked fine on my local microk8s cluster (without Istio enabled).
Code:
Error message:
Hope this is useful for the dask-kubernetes contributors (#197) or others with the same issue.
Just wanted to confirm that running a notebook without istio, and then starting a Dask cluster (also without Istio) works.
So looks like we/I need to find a way to start using services.