-
-
Notifications
You must be signed in to change notification settings - Fork 153
Spawn Dask scheduler on separate Kubernetes pod #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I agree that this would be useful. It also seems doable to me, but would
require moderate effort.
I'm a bit curious how often people have access to a Kubernetes cluster when
they're not in the cluster themselves.
…On Mon, Jul 9, 2018 at 4:02 PM, Christian Hudon ***@***.***> wrote:
This feature request is a followup to #82
<#82>. Having at least the
option to spawn the Dask scheduler on a remote Kubernetes pod would enable
more use cases for Dask-kubernetes, including at least the "run Jupyter on
my notebook, but do the Dask computation on a remote cluster" one.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#84>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASszJ5ei1hMTwHvSOepbQqFn2Xs2ROIks5uE7bHgaJpZM4VITcF>
.
|
This is definitely something we would use in anger. Running Jupyter on a laptop and then connecting to a cloud based cluster for computation would be really useful. |
@jacobtomlinson is this something that is important enough to you all to
help develop? I imagine that some parts of this, like making adaptive work
across a network, I'll probably have to do, but I'm curious if there are
parts for which I can lean on others. My guess is that the first pass of
just putting the scheduler in another pod is probably something that you
are as if not more capable of than I am :)
…On Tue, Jul 10, 2018 at 3:28 AM, Jacob Tomlinson ***@***.***> wrote:
This is definitely something we would use in anger.
Running Jupyter on a laptop and then connecting to a cloud based cluster
for computation would be really useful.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#84 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASszCnnQNZDziUxrF9J7VD-3YTPfmDdks5uFFe5gaJpZM4VITcF>
.
|
@mrocklin I will have to check my schedule and see if I can dedicate time to this. |
@mrocklin From my perspective, everyone is 5 minutes (and a credit card) away from having access to a Kubernetes cluster when they outgrow their laptop for computations. Especially if #85 is also implemented. Then they don't need to install anything else but dask-kubernetes; they just instantiate a |
We would really like to explore the idea of having there be a central scheduler that users via jupyter notebook/terminal could log into and run large batch jobs. I'd like to understand how to do something like the financial modeling team in the dask use cases What is the best place to start on getting this moving?
|
+1 |
Is it still open? Can I try this? @jgerardsimcock @chrish42 Certainly it would have small audience but it would really help the data scientists kind of people to just connect with a cluster and do processing on huge datasets. |
@mrocklin @jacobtomlinson Am I wrong in thinking that you could create and start the Or is this issue saying a whole new RPC setup needs to be developed, where you start some listening socket on a master in the cluster that will take RPCs to initialize Or neither? I'm just trying to better understand the problem statement here. |
You could do something like that, yes, but it's a bit reversed of what I suspect will be a common workflow. The situation we care about is that someone has a laptop and they have a kubernetes cluster. From their laptop they want to ask Kubernetes to create a Dask scheduler and a bunch of Dask workers that talk to the scheduler, and then they create a client locally on their laptop and connect to that scheduler. Currently with the way KubeCluster is designed the scheduler is only created locally, so the user has to be on the Kubernetes cluster. So instead of something like this. class KubeCluster:
def start(...)
self.scheduler = Scheduler(...) # actually this happens inside of the `self.cluster = LocalCluster(...)` today We want something like this class KubeCluster:
def start(...):
self.scheduler_pod = kubernetes.create_pod(scheduler_pod_specification)
self.scheduler_connection = connect_to(scheduler_pod) Or at least we want the option to do that. There will be other cases where we'll want the old behavior as well. |
Doesn't dask-yarn work with a scheduler-in-a-container? |
Yes
…On Wed, Mar 6, 2019 at 11:10 AM Martin Durant ***@***.***> wrote:
Doesn't dask-yarn work with a scheduler-in-a-container?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#84 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASszFj3vyE0ufHSDx_9qdhSYTyEPkgcks5vT_aXgaJpZM4VITcF>
.
|
I think this refactor would be fairly tightly coupled to whatever results from dask/distributed#2235? |
Now that the Helm chart updates are in progress in #128 we have a better handle on the use cases and variables needed to put the scheduler in cluster.
|
We currently ask the user for a worker pod specification template. We should probably expand this to also include a scheduler pod specification template. I agree that expanding everything out as keyword arguments would probably be difficult to maintain. So I think that all we really need here from an API perspective is to add a |
Maybe that will be of some help to others, but we had the situation where we wanted to have the client on our own machines and just dispatch dask workers/scheduler to kubernetes. So I made a tiny library to do it, it is not very well tested but it works on our University settings. |
This has now been implemented in #162 and can be enabled with This created the scheduler in a pod on the cluster and also creates a service to enable traffic to be routed to the pod. This is a This is currently not the default as it is non-trivial to route traffic to the dashboard using this setup. Further testing and development would be great! |
I may not be following this thread correctly, but running |
@wwoods the scheduler will be placed behind a service, by default this will be of type So if you leave the defaults then your kubernetes cluster must be able to assign a Load Balancer and your client must be able to connect to it. If you directly have access to the internal kubernetes network then I recommend setting the service type to Without knowing more about you kubernetes cluster setup I can't provide more advice. |
@jacobtomlinson Just trying to get this working in a "kind" context (local cluster), from scratch. It looks like the service is configured as
And here's the output of
It looks like the |
It looks like your local machine can't resolve kubernetes DNS in your local cluster. If you were using a managed cluster with a load balanacer you would be provided with an address you could resolve. You will need to configure things correctly to enable this. What local implementation are you using? (docker desktop, k3s, minikube, etc) |
@jacobtomlinson right - I haven't used kubernetes much, but this particular bit of documentation is proving rather hard to find. I know it's not exactly a dask-kubernetes problem, but I do appreciate you pointing me in the right direction. It's somewhat necessary information to take dask-kubernetes for a test drive. I was using kind (https://github.com/kubernetes-sigs/kind), but I'm not attached. Also tried minikube since it explicitly mentioned DNS, but no luck. |
I'm afraid I don't have experience with kind. I personally use docker desktop on my Mac for local development. We use minikube for CI and testing. |
Any idea how you'd get it working with minikube?
…On Thu, Nov 14, 2019, 7:33 AM Jacob Tomlinson ***@***.***> wrote:
I'm afraid I don't have experience with kind. I personally use docker
desktop on my Mac for local development. We use minikube for CI and testing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#84?email_source=notifications&email_token=AABWH2B33NIAMW72QDQDX5LQTVVVPA5CNFSM4FJBG4C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEECHOEA#issuecomment-553940752>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABWH2BWN2EPNWYECVGNHXLQTVVVPANCNFSM4FJBG4CQ>
.
|
If you have a look at the ci config you can see how it is done there. |
My Kubernetes cluster is provisioned with KOPS which doesn't create a load balancer in AWS by default. I was looking for a good solution yesterday and discovered kubefwd which will add Kubernetes services to your hosts file so that urls like |
Hi, I am in the same situation here. I am trying to run a remote scheduler and workers on a managed k8 from my laptop over the internet.
I believe managed k8 users are more data science people than k8 admins. Also dask-gateway seems overkill for a single user. What do you think? |
That sounds to me like a version mismatch in Dask between the scheduler, workers or client. I'm not sure it is really related to this issue. Could you check all your Dask versions are up to date and if you're still having trouble raise a new issue. I also agree that |
You are right, It's working for me now. For the record I had to face:
Thank again Jacob |
I'm going to close this out as this is now the default behaviour. |
This feature request is a followup to #82. Having at least the option to spawn the Dask scheduler on a remote Kubernetes pod would enable more use cases for Dask-kubernetes, including at least the "run Jupyter on my notebook, but do the Dask computation on a remote cluster" one.
The text was updated successfully, but these errors were encountered: