
Use kubernetes volumes for data storage rather than placing data directly on the container filesystem. That provides a starting point for thinking about persistent data -- one could replace the emptyDir source with an explicit path via hostDir, and then you would have storage that would persist over a container delete/re-create. Change-Id: Ifade1cb2ba546e5e0207c3d8c84965dc2195716b
23 lines
450 B
YAML
23 lines
450 B
YAML
desiredState:
|
|
manifest:
|
|
volumes:
|
|
- name: mariadb-data
|
|
source:
|
|
emptyDir: {}
|
|
containers:
|
|
- env:
|
|
- name: DB_ROOT_PASSWORD
|
|
value: password
|
|
image: kollaglue/fedora-rdo-mariadb
|
|
name: mariadb
|
|
ports:
|
|
- containerPort: 3306
|
|
volumeMounts:
|
|
- name: mariadb-data
|
|
mountPath: /var/lib/mysql
|
|
id: mariadb-1
|
|
version: v1beta1
|
|
id: mariadb
|
|
labels:
|
|
name: mariadb
|