forked from yemnaing/k8s-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3-database.yml
44 lines (44 loc) · 811 Bytes
/
3-database.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: hollowdb
labels:
app: hollowdb
spec:
replicas: 1
selector:
matchLabels:
app: hollowdb
strategy:
type: Recreate
template:
metadata:
labels:
app: hollowdb
spec:
containers:
- name: mysql
image: theithollow/hollowapp-blog:dbv1
imagePullPolicy: Always
ports:
- containerPort: 3306
volumeMounts:
- name: mysqlstorage
mountPath: /var/lib/mysql
volumes:
- name: mysqlstorage
persistentVolumeClaim:
claimName: mysqlvol
---
apiVersion: v1
kind: Service
metadata:
name: hollowdb
spec:
ports:
- name: mysql
port: 3306
targetPort: 3306
protocol: TCP
selector:
app: hollowdb