Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save russomi/7faa7d59da730777a430fa56160c8e73 to your computer and use it in GitHub Desktop.
Save russomi/7faa7d59da730777a430fa56160c8e73 to your computer and use it in GitHub Desktop.
HPE Ezmeral Container Platform

HPE Ezmeral Container Platform

minikube

zero to jupyterhub k8s

https://github.com/russomi-labs/zero-to-jupyterhub-k8s https://github.com/russomi-labs/minimalist-jupyterhub/blob/master/docs/source/cheat-localdev.md

minimalist local dev using minikube

# Make sure brew is updated:

brew update

# If you need to start from a clean slate, use:

minikube delete
sudo rm -rf ~/.minikube

# Then, to install, use:

brew install minikube

# To upgrade, use:

brew upgrade minikube

# To reinstall, use:

brew reinstall minikube

# Once minikube is installed...

minikube start --memory=4096 --driver=virtualbox
# minikube start

# # use docker daemon inside minikube
# eval $(minikube docker-env)

# # git clone git@github.com:jupyterhub/zero-to-jupyterhub-k8s.git
# git clone git@github.com:russomi-labs/zero-to-jupyterhub-k8s.git
# cd zero-to-jupyterhub-k8s

# # create virtual environment

# python3 -m venv .

# # activate venv

# source bin/activate

# install dependency

# pip install ruamel.yaml

# build docker images in minikube
# ./build.py build

# edit minikube-conf.yaml, and, if desired, create an additional file { -f config.yaml }
# helm upgrade --wait --install --namespace=hub hub jupyterhub/ -f minikube-config.yaml

# minikube service --namespace=hub proxy-public

# Install Helm
curl https://raw.githubusercontent.com/helm/helm/HEAD/scripts/get-helm-3 | bash
helm version

# Install Jupyterhub
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo update

# Now install the chart configured by your config.yaml by running this command from the directory that contains your config.yaml:
helm upgrade jhub-release-1 jupyterhub/jupyterhub \
  --cleanup-on-fail \
  --install \
  --namespace jhub \
  --create-namespace \
  --values config.yaml

# Wait for the hub and proxy pod to enter the Running state.
kubectl get pod --namespace jhub --watch

# and set a default value for the --namespace flag:
kubectl config set-context $(kubectl config current-context) --namespace jhub

kubectl get service --namespace jhub
kubectl describe service proxy-public --namespace jhub

# https://minikube.sigs.k8s.io/docs/handbook/accessing/
minikube service list

minikube service --url <service-name>

kubectl get service <service-name> --output='jsonpath="{.spec.ports[0].nodePort}"'

https://github.com/jupyterhub/zero-to-jupyterhub-k8s/issues/1597
https://stackoverflow.com/a/64323976
https://youtu.be/y9l0ce-7-iQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment