forked from k21academyuk/Kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmariadb-deployment.yaml
45 lines (45 loc) · 1.08 KB
/
mariadb-deployment.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: Deployment
metadata:
labels:
app: mariadb
name: mariadb-deployment
spec:
replicas: 1
selector:
matchLabels:
app: mariadb
template:
metadata:
labels:
app: mariadb
spec:
containers:
- image: docker.io/mariadb:10.4
name: mariadb
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb-root-password
key: password
envFrom:
- secretRef:
name: mariadb-user-creds
ports:
- containerPort: 3306
protocol: TCP
volumeMounts:
- mountPath: /var/lib/mysql
name: mariadb-volume-1
- mountPath: /etc/mysql/conf.d
name: mariadb-config-volume
volumes:
- emptyDir: {}
name: mariadb-volume-1
- configMap:
name: mariadb-config
items:
- key: max_allowed_packet.cnf
path: max_allowed_packet.cnf
name: mariadb-config-volume