37 lines
No EOL
852 B
YAML
37 lines
No EOL
852 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mariadb-deployment
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: mariadb
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mariadb
|
|
spec:
|
|
containers:
|
|
- name: mariadb
|
|
image: "mariadb:11.2.4"
|
|
ports:
|
|
- containerPort: 3306
|
|
envFrom:
|
|
- configMapRef:
|
|
name: mariadb-details
|
|
env:
|
|
- name: MARIADB_ROOT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: db-credentials
|
|
key: password
|
|
- name: MARIADB_DATABASE
|
|
value: mdb_db
|
|
volumeMounts:
|
|
- mountPath: /var/lib/postgresql/data
|
|
name: mariadb_data
|
|
volumes:
|
|
- name: mariadb_data
|
|
persistentVolumeClaim:
|
|
claimName: mariadb-volume-claim |