apiVersion: v1
kind: Pod
metadata:
  labels:
    app: mariadb
  name: mariadb
spec:
  volumes:
  - name: test-volume
    hostPath:
      path: /data/mariadb
      type: DirectoryOrCreate
  containers:
  - image: mariadb:10.5.8
    name: mariadb
    resources: {}
    #nodeName: k8s-worker01
    env:
    - name: MYSQL_USER
      value: "springuser"
    - name: MYSQL_PASSWORD
      value: "mypassword-quoor-uHoe7z"
    - name: MYSQL_DATABASE
      value: "db_todo"
    - name: MYSQL_ROOT_PASSWORD
      value: "r00t-aeKie8ahWai_"
    volumeMounts:
    - mountPath: /var/lib/mysql
      name: test-volume
    ports:
      - name: mariadb 
        containerPort: 3306
        protocol: TCP
