Used the following commands to install kubernetes and the jupyterhub 2.0.0 from helm chart:
sudo snap install microk8s --classic --channel=1.27
sudo usermod -a -G microk8s root
sudo chown -f –R root ~/.kube
sudo usermod -a -G microk8s ziadmin
sudo chown -f -R ziadmin ~/.kube
microk8s enable dns
microk8s enable hostpath-storage
microk8s enable helm3
microk8s enable metallb:10.0.54.200-10.0.54.220
sudo systemctl enable iscsid.service
microk8s enable openebs
mkdir /srv/storage
nano local-storage-dir.yaml
local-storage-dir.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-storage-dir
annotations:
storageclass.kubernetes.io/is-default-class: “true”
OpenEBS - Kubernetes storage simplified local
cas.openebs.io/config: |
- name: StorageType
value: hostpath
- name: BasePath
value: /srv/storage
provisioner: OpenEBS - Kubernetes storage simplified
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
microk8s.kubectl apply -f local-storage-dir.yaml
microk8s helm repo add jupyterhub See installation instructions for: | JupyterHub’s Helm chart repository
microk8s helm repo update
openssl req -x509 -newkey rsa:2048 -keyout key.key -out cert.crt -sha256 -days 365 –nodes
microk8s kubectl create secret tls tlskey1 -n hub1
–key /home/ziadmin/key1.key
–cert /home/ziadmin/cert.crt
##config.yaml
proxy:
https:
enabled: true
hosts:
- jupyterhub.domain.com
type: secret
secret:
name: tlskey1
This is the describe that is given in the server:
Name: hub-868d96d9f8-knpkg
Namespace: hub1
Priority: 0
Service Account: hub
Node:
Labels: app=jupyterhub
component=hub
hub.jupyter.org/network-access-proxy-api=true
hub.jupyter.org/network-access-proxy-http=true
hub.jupyter.org/network-access-singleuser=true
pod-template-hash=868d96d9f8
release=jupyterhub
Annotations: checksum/config-map: 8c9277900b1733fbd2c03beee829b9d3350306c001f9477a31477825f690c5cd
checksum/secret: ae72ee33b391d0f87507744fe5346f341afdeb13eada35f3b830bd7c10551024
Status: Pending
IP:
IPs:
Controlled By: ReplicaSet/hub-868d96d9f8
Containers:
hub:
Image: jupyterhub/k8s-hub:2.0.0
Port: 8081/TCP
Host Port: 0/TCP
Args:
jupyterhub
–config
/usr/local/etc/jupyterhub/jupyterhub_config.py
–upgrade-db
Liveness: http-get http://:http/hub/health delay=300s timeout=3s period=10s #success=1 #failure=30
Readiness: http-get http://:http/hub/health delay=0s timeout=1s period=2s #success=1 #failure=1000
Environment:
PYTHONUNBUFFERED: 1
HELM_RELEASE_NAME: jupyterhub
POD_NAMESPACE: hub1 (v1:metadata.namespace)
CONFIGPROXY_AUTH_TOKEN: <set to the key ‘hub.config.ConfigurableHTTPProxy.auth_token’ in secret ‘hub’> Optional: false
Mounts:
/srv/jupyterhub from pvc (rw)
/usr/local/etc/jupyterhub/config/ from config (rw)
/usr/local/etc/jupyterhub/jupyterhub_config.py from config (rw,path=“jupyterhub_config.py”)
/usr/local/etc/jupyterhub/secret/ from secret (rw)
/usr/local/etc/jupyterhub/z2jh.py from config (rw,path=“z2jh.py”)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-gmqv6 (ro)
Volumes:
config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: hub
Optional: false
secret:
Type: Secret (a volume populated by a Secret)
SecretName: hub
Optional: false
pvc:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: hub-db-dir
ReadOnly: false
kube-api-access-gmqv6:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional:
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors:
Tolerations: hub.jupyter.org/dedicated=core:NoSchedule
hub.jupyter.org_dedicated=core:NoSchedule
node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events: