-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKubernetesDashboardWithPv.yaml
75 lines (75 loc) · 1.54 KB
/
KubernetesDashboardWithPv.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
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-gateway
namespace: forest
spec:
capacity:
storage: 5Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: gateway-local-storage
local:
path: /data/forest-gateway/log
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pvc-gateway
namespace: forest
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: gateway-local-storage
---
apiVersion: apps/v1
kind: Service
metadata:
name: forest-gateway-dashboard
namespace: forest
spec:
ports:
- port: 8880
name: "dashboard"
targetPort: 8880
protocol: TCP
nodePort: 30088
type: NodePort
selector:
name: forest-gateway-dashboard-pod
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: forest-gateway-dashboard
namespace: gateway
spec:
selector:
matchLabels:
app: forest-gateway-dashboard-pod
serviceName: svc-mysql
replicas: 1
template:
metadata:
labels:
app: forest-gateway-dashboard-pod
spec:
terminationGracePeriodSeconds: 10
containers:
- name: forest-gateway-dashboard
image: forest-gateway-dashboard:latest
imagePullPolicy: Never
ports:
- containerPort: 8880
volumeMounts:
- name: gateway-log
mountPath: /go/src/app/logs
volumes:
- name: gateway-log
persistentVolumeClaim:
claimName: pvc-gateway