Skip to content

Commit 7495246

Browse files
authored
Merge pull request kubernetes-client#1749 from RonMallory/fix/jupyter-yaml
fix: remove depriciated gitrepo volume type
2 parents ee67a03 + 1023816 commit 7495246

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

examples/notebooks/README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Jupyter Notebooks for Kubernetes
2-
================================
1+
# Jupyter Notebooks for Kubernetes
32

43
This is a set of Jupyter notebooks to learn the Kubernetes API in Python.
54

@@ -11,9 +10,20 @@ kubectl create -f docker/jupyter.yml
1110

1211
Open your browser on the jupyter service and go through the notebooks.
1312

14-
If you are using minikube, you can run this command to see jupyter service in your browser:
13+
If you are using minikube:
1514

1615
```
16+
# You can run this command to see jupyter service in your browser:
17+
1718
minikube service jupyter
19+
20+
# You can run this command to get the url in console
21+
minikube service --url jupyter
22+
1823
```
1924

25+
Clean up your deployment.
26+
27+
```
28+
kubectl delete -f docker/jupyter.yml
29+
```

examples/notebooks/docker/jupyter.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ metadata:
2020
labels:
2121
app: jupyter
2222
spec:
23+
initContainers:
24+
- name: git-clone
25+
image: alpine/git
26+
args:
27+
- clone
28+
- --single-branch
29+
- --
30+
- https://github.com/kubernetes-client/python.git
31+
- /data
32+
volumeMounts:
33+
- mountPath: /data
34+
name: notebook-volume
2335
containers:
2436
- name: jupyter
2537
image: skippbox/jupyter:0.0.3
@@ -32,5 +44,4 @@ spec:
3244
name: notebook-volume
3345
volumes:
3446
- name: notebook-volume
35-
gitRepo:
36-
repository: "https://github.com/kubernetes-client/python.git"
47+
emptyDir: {}

0 commit comments

Comments
 (0)