-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
cephfs-volume-example.yml
51 lines (51 loc) · 950 Bytes
/
cephfs-volume-example.yml
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
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cephfs-volume-example
spec:
storageClassName: csi-cephfs-sc
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Pod
metadata:
name: cephfs-volume-example
labels:
app: cephfs-volume-example
spec:
containers:
- name: nginx
image: sikalabs/nginx-public
resources:
requests:
cpu: 20m
memory: 30Mi
limits:
cpu: 50m
memory: 50Mi
ports:
- containerPort: 80
volumeMounts:
- mountPath: /usr/share/nginx/html
name: data
volumes:
- name: data
persistentVolumeClaim:
claimName: cephfs-volume-example
---
apiVersion: v1
kind: Service
metadata:
name: cephfs-volume-example
spec:
type: ClusterIP
selector:
app: cephfs-volume-example
ports:
- port: 80
protocol: TCP
targetPort: 80