Closed jadeidev closed 2 years ago
Ok, after reading some other issues I have been able to find some problems and make it work. #466 was definitely helpful.
It seems that worker-spec.yml file is causing issues. need to change name to dask-worker
kind: Pod
spec:
restartPolicy: Never
containers:
- image: ghcr.io/dask/dask:latest
imagePullPolicy: Always
args:
[
dask-worker,
--nthreads,
"6",
--no-dashboard,
--memory-limit,
16GB,
--death-timeout,
"60",
]
name: dask-worker
resources:
limits:
cpu: "6"
memory: 16G
requests:
cpu: "6"
memory: 16G
Sorry you're having trouble here. You are right that the container is expected to have a certain name.
I checked our docs to see what the example shows and that was wrong so I've raised #500 to fix that.
Given that you've found a solution I'm going to close this out. But please feel free to follow up if you have any more issues.
What happened: I am trying to run my dask application from within the k8s cluster. I have created a service account, role (based on Role-Based Access Control) and role binging. My container has a python script that runs the script below (
run.py
) with the correspondingworker-spec.yml
. The application runs just fine when I trigger it from my machine on this cluster. However, when I create a pod within K8s that runs this script I am getting the following error:What you expected to happen:
Minimal Complete Verifiable Example: Step 1: create a container that has python, dask and the files run.py and worker-spec.yml (see below) and run
CMD ["python","run.py"]
step 2: create the cron job that runs a pod with a container in step 1run.py
woker-spec.py
Anything else we need to know?:
Environment:
Cluster Dump State: