kind: ConfigMap
apiVersion: v1
metadata:
name: example-configmap
data:
# als Wertepaare
database: mongodb
my.cnf: |
[mysqld]
slow_query_log = 1
innodb_buffer_pool_size = 1G
#deploy.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: mariadb-deployment
spec:
selector:
matchLabels:
app: mariadb
replicas: 1
template:
metadata:
labels:
app: mariadb
spec:
containers:
- name: mariadb-cont
image: mariadb:latest
envFrom:
- configMapRef:
name: mariadb-configmap
volumeMounts:
- name: example-configmap-volume
mountPath: /etc/my
volumes:
- name: example-configmap-volume
configMap:
name: example-configmap