Why does kubectl run dask --image daskdev/dask fail?
# starting the container with docker to make sure it basically works
➜ ~ docker run --rm -it --entrypoint bash daskdev/dask:latest
(base) root@5b34ce038eb3:/# python
Python 3.8.0 (default, Nov 6 2019, 21:49:08)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dask
>>>
>>> exit()
(base) root@5b34ce038eb3:/# exit
exit
# now trying to fire up the container on a minikube cluster
➜ ~ kubectl run dask --image daskdev/dask
pod/dask created
# let's see what's going on with the Pod
➜ ~ kubectl get pods -w
NAME READY STATUS RESTARTS AGE
dask 0/1 CrashLoopBackOff 1 13s
dask 0/1 Completed 2 24s
dask 0/1 CrashLoopBackOff 2 38s
# not sure why the logs look like something is missing
➜ ~ kubectl logs dask --tail=100
+ '[' '' ']'
+ '[' -e /opt/app/environment.yml ']'
+ echo 'no environment.yml'
+ '[' '' ']'
+ '[' '' ']'
+ exec
no environment.yml
kubectl describe pod dask, you will see that last state wasTerminatedwith Exit Code 0, that literally means you container was launched successfully, did it job and finished also successfully. What else you expect to happen with pod? IN addition, when you create pod usingkubectl run dask --image daskdev/dask- it creates with therestartPolicy: Alwaysby default!!!!Always means that the container will be restarted even if it exited with a zero exit code (i.e. successfully).
/opt/app/environment.ymlin your container. If im not mistake, you should first configure it with prepare.sh. PLease check more here - DASK sectionrestartPolicy: Never.