-
Notifications
You must be signed in to change notification settings - Fork 15
/
mysql-db-service.yaml
53 lines (53 loc) · 1.03 KB
/
mysql-db-service.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
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql-server
spec:
selector:
matchLabels:
app: mysql-server
serviceName: mysql-server
replicas: 1
template:
metadata:
labels:
app: mysql-server
spec:
containers:
- name: mysql-server
image: mysql:5.6
env:
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: "yes"
readinessProbe:
tcpSocket:
port: 3306
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 200m
memory: 512Mi
ports:
- containerPort: 3306
volumeMounts:
- mountPath: /var/lib/mysql
name: mysql-vol
volumes:
- name: mysql-vol
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: system-mysql
spec:
ports:
- name: mysql-server
port: 3306
targetPort: 3306
protocol: TCP
selector:
app: mysql-server