apiVersion: v1
kind: Pod
metadata:
  labels:
    app: mariadb
    tier: database
  name: mariadb
spec:
  containers:
  - env:
    - name: MYSQL_ROOT_PASSWORD
      value: mysqlAdmin123
    image: mariadb
    imagePullPolicy: Always
    name: mariadb
    ports:
    - containerPort: 3306
      name: mariadb
      protocol: TCP
    volumeMounts:
      - mountPath: /var/lib/mysql 
        name: mypd
  volumes:
    - name: mypd
      persistentVolumeClaim:
        claimName: pvc-mariadb
