32 lines
599 B
YAML
32 lines
599 B
YAML
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: mysql
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: mysql
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: mysql
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: mysql
|
||
|
image: mariadb:10
|
||
|
ports:
|
||
|
- containerPort: 3306
|
||
|
env:
|
||
|
- name: MYSQL_ROOT_PASSWORD
|
||
|
value: securepassword
|
||
|
valueFrom:
|
||
|
secretKeyRef:
|
||
|
name: mysql-creds
|
||
|
key: mysql_password
|
||
|
- name: MYSQL_DATABASE
|
||
|
value: wordpress
|
||
|
|
||
|
# vim: set ts=2 sw=2 et:
|