kubeflow - jupyter pod got stuck after spawning sometime

3/27/2019

I am new to the world of Kubernetes. I am trying to deploy jupyter notebook inside the cluster. I have created kubernetes cluster with reference to official docs. The notebook says it will redirect to the home page once the spawning is finished. But jupyter pod got stuck after spawning sometime.

jupyter pod got stuck after spawning sometime

I referred similar issue in GitHub but couldn't find the answer. The referred link is Github Link

From the comments from the issue suggested that whether the jupyter hub uses the persistent disk. I ran those commands, seems persistent disk are attached.

kubectl -n default get po,svc,deploy,pv,pvc -o wide

    NAME                                 READY   STATUS      RESTARTS   AGE   IP          NODE                                             NOMINATED NODE
pod/deploy-ml-pipeline-csnx4-j556r   0/1     Completed   0          30m   10.60.1.6   gke-churnprediction-default-pool-142b8f7d-d4kv   <none>

NAME                 TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)   AGE   SELECTOR
service/kubernetes   ClusterIP   10.63.240.1   <none>        443/TCP   32m   <none>

NAME                                                        CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                     STORAGECLASS   REASON   AGE
persistentvolume/pvc-57af1a5e-505d-11e9-9b66-42010a800130   10Gi       RWO            Delete           Bound    kubeflow/vizier-db        standard                27m
persistentvolume/pvc-70874d08-505d-11e9-9b66-42010a800130   10Gi       RWO            Delete           Bound    kubeflow/minio-pv-claim   standard                26m
persistentvolume/pvc-70b1712e-505d-11e9-9b66-42010a800130   10Gi       RWO            Delete           Bound    kubeflow/mysql-pv-claim   standard                26m
persistentvolume/pvc-86d45ad1-505d-11e9-9b66-42010a800130   10Gi       RWO            Delete           Bound    kubeflow/claim-madhi      standard                25m

This is the result of the above command which according to my knowledge persistent disk are successfully attached! I really don't know how it's internally working. So, I can't able to figure out what's the problem here. Can any explain the problem or provide the link of kubernetes architecture link? It will be helpful for me to understand the core concept behind the kubernetes.

Below is the command used to get description about pod

kubectl describe pod pod_name

enter image description here

to get the yaml file

kubectl get pod pod_name -o yaml

enter image description here enter image description here

-- Madhi
jupyter-notebook
kubeflow
kubernetes

1 Answer

4/8/2019

I somewhat figured out the solution but I don't know either this is the exact solution or still there is a problem. As per the comment, there is no issue with the pod or other configuration files. I somewhat thought it might be the localhost problem. So, I tried changing the port from 8085 to 8081 and re-run the start_ui.sh script. The spawning error disappeared and it redirected me to the juypter working directory.

kubectl port-forward -n ${NAMESPACE} $(kubectl get pods -n ${NAMESPACE} --selector=service=ambassador -o jsonpath='{.items[0].metadata.name}') 8081:80

And If you want to avoid all this problem, then the effective way is to the run the kubeflow in endpoints instead of localhost which eliminates all this problem. To view the dashboard at endpoints you need to setup the IAM access initially while creating a cluster.

-- Madhi
Source: StackOverflow