0
  • I have setup a Jupyterhub running on K8s
  • It authenticates and launches private user notebook-servers (pods) in the K8s
  • But these pods are private to K8s networking, and I want to connect to it from Local VSCode via its Remote Kernel Connection

I tried to find resources, but there isn't much available that matches my setup, can anyone help me redirect to the setup. Also attaching the jupyterhub-config.yaml I am using currently to create single user pods as a notebook-server.

singleuser:
  extraContainers:
    - name: "somename"
      image: "{{ jupyter_notebook_image_name }}:{{ jupyter_notebook_tag }}"
      command: ["/usr/local/bin/main.sh"]
      securityContext:
        runAsUser: 0
      lifecycle:
        postStart:
          exec:
            command: ["/bin/sh", "-c", "cp copy.json copy.json"]
      env:
        - name: JUPYTERHUB_USER
          value: '{unescaped_username}'
      volumeMounts:
        - name: projects
          mountPath: /.sols/
        - name: home-projects-dir
          mountPath: /home/jovyan/projects/
        - name: kernels-path
          mountPath: /usr/local/share/jupyter/kernels/
  lifecycleHooks:
    postStart:
          exec:
            command: ["/bin/sh", "-c", "cp copy.json copy.json"]
  uid: 0
  storage:
    capacity: 1Gi
    homeMountPath: /home/jovyan/{username}
    extraVolumes:
      - name: projects
        persistentVolumeClaim:
          claimName: projects--hub-pvc
      - name: home-projects-dir
      - name: kernels-path
    extraVolumeMounts:
      - name: projects
        mountPath: /.sols/
      - name: home-projects-dir
        mountPath: /home/jovyan/projects/
      - name: kernels-path
        mountPath: /usr/local/share/jupyter/kernels/
    dynamic:
      storageClassName: jupyter
      pvcNameTemplate: '{username}--hub-pvc'
      volumeNameTemplate: '{username}--hub-pv'
      storageAccessModes: [ReadWriteMany]
  image:
    name: {{ jupyter_notebook_image_name }}
    tag: {{ jupyter_notebook_tag }}
    pullSecrets:
      xxxkey
  • You should try Jupyterlab: https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906 – Bruno Peixoto Nov 09 '22 at 15:18
  • I’d recommend the vscode `code-server` app which can be installed as a jupyterlab plug-in. This, in combination with jupyter-server-proxy, allows you to use a web-based vscode application and go through your existing authentication and security rather than setting up a new connection method. See: https://discourse.jupyter.org/t/how-to-configure-jupyterhub-to-run-code-server/11578/4 – Michael Delgado Nov 09 '22 at 15:26

0 Answers0