DEV Community

I love integers
I love integers

Posted on

JupyterHub addons for microk8s

I find microk8s is pretty to use for dev and light-usage environment like a small lab or team of data scientists.

I wrote an addon for it to quickly let people to install jupyterhub to a microk8s cluster with one command.

GitHub logo yuhuishi-convect / jhub-addon

Jupyterhub addon for microk8s

JupyterHub addon for Microk8s

Usage

Please make sure you have dns addon enabled and a default StorageClass exists in your microk8s cluster. For convenience, you can use

microk8s enable dns
microk8s enable hostpath-storage
Enter fullscreen mode Exit fullscreen mode

To visit jupyterhub externally, you can enable ingress and metallb addons.

microk8s enable ingress
# the ip pool varies depending on your setup. see https://microk8s.io/docs/addon-metallb for more info
microk8s enable metallb:10.64.140.43-10.64.140.49
Enter fullscreen mode Exit fullscreen mode

To use jupyterhub

# Add repo
microk8s addons repo add https://github.com/yuhuishi-convect/jhub-addon

# Enable jupyterhub
microk8s enable jupyterhub

# Alternatively you can provide a values.yaml to configure jupyterhub
# See https://zero-to-jupyterhub.readthedocs.io/en/latest/resources/reference.html for a comprehensive reference
microk8s enable jupyterhub -- -f /path/to/values.yaml

# to view the ip address to for the jupyterhub service
microk8s kubectl get svc -n jhub -l app=jupyterhub,component=proxy-public

# disable the addon
microk8s disable jupyterhub
Enter fullscreen mode Exit fullscreen mode

Configuration

You can supply a values.yaml to use with the addon by

microk8s enable jupyterhub -- -f /path/to/values.yaml
Enter fullscreen mode Exit fullscreen mode



Discussion (0)