-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjupyter.yaml
87 lines (87 loc) · 1.52 KB
/
jupyter.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
apiVersion: v1
kind: PersistentVolume
metadata:
name: jupyter-books
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jupyter-books
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jupyter
spec:
replicas: 1
selector:
matchLabels:
app: jupyter
template:
metadata:
labels:
app: jupyter
spec:
containers:
- name: jupyter
image: marceloglezer/jupyter:latest
resources:
requests:
memory: "2Gi"
limits:
memory: "2Gi"
#cpu: "4"
ports:
- containerPort: 8888
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: "/books"
name: j-books
volumes:
- name: j-books
persistentVolumeClaim:
claimName: jupyter-books
---
apiVersion: v1
kind: Service
metadata:
name: jupyter
spec:
ports:
- port: 8888
targetPort: 8888
name: tcp
selector:
app: jupyter
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: jupyter
annotations:
kubernetes.io/ingress.class: "traefik"
spec:
rules:
- http:
paths:
- path: /
backend:
serviceName: jupyter
servicePort: 8888