diff --git a/examples/notebooks/README.md b/examples/notebooks/README.md index 324a6b0c7..8417f7f6f 100644 --- a/examples/notebooks/README.md +++ b/examples/notebooks/README.md @@ -1,5 +1,4 @@ -Jupyter Notebooks for Kubernetes -================================ +# Jupyter Notebooks for Kubernetes This is a set of Jupyter notebooks to learn the Kubernetes API in Python. @@ -11,9 +10,20 @@ kubectl create -f docker/jupyter.yml Open your browser on the jupyter service and go through the notebooks. -If you are using minikube, you can run this command to see jupyter service in your browser: +If you are using minikube: ``` +# You can run this command to see jupyter service in your browser: + minikube service jupyter + +# You can run this command to get the url in console +minikube service --url jupyter + ``` +Clean up your deployment. + +``` +kubectl delete -f docker/jupyter.yml +``` diff --git a/examples/notebooks/docker/jupyter.yml b/examples/notebooks/docker/jupyter.yml index 65e70ec05..61f12eddf 100644 --- a/examples/notebooks/docker/jupyter.yml +++ b/examples/notebooks/docker/jupyter.yml @@ -20,6 +20,18 @@ metadata: labels: app: jupyter spec: + initContainers: + - name: git-clone + image: alpine/git + args: + - clone + - --single-branch + - -- + - https://github.com/kubernetes-client/python.git + - /data + volumeMounts: + - mountPath: /data + name: notebook-volume containers: - name: jupyter image: skippbox/jupyter:0.0.3 @@ -32,5 +44,4 @@ spec: name: notebook-volume volumes: - name: notebook-volume - gitRepo: - repository: "https://github.com/kubernetes-client/python.git" + emptyDir: {}