-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmysql.deploy.yaml
45 lines (45 loc) · 1.08 KB
/
mysql.deploy.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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql
namespace: mysql
spec:
replicas: 1
serviceName: mysql
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: registry.cn-qingdao.aliyuncs.com/dataease/mysql:5.7.36
imagePullPolicy: IfNotPresent
resources:
requests:
memory: 200Mi
cpu: 0.2
env:
- name: MYSQL_ROOT_PASSWORD
value: 'Csii@401'
ports:
- name: tcp
containerPort: 3306
volumeMounts:
- mountPath: /etc/mysql/conf.d/my.cnf
name: mysql-config
subPath: my.cnf
- mountPath: /var/lib/mysql
name: mysql-data
subPath: mysql
volumes:
- name: mysql-config
configMap:
name: mysql-config
defaultMode: 420
- name: mysql-data
persistentVolumeClaim:
claimName: mysql-data-pvc