apiVersion: v1
kind: Pod
metadata:
  name: my-database
spec:
  containers:
    - name: database
      image: mysql:5.7
      env:
        - name: MYSQL_USER
          value: example
        - name: MYSQL_PASSWORD
          value: secret
        - name: MYSQL_DATABASE
          value: example
        - name: MYSQL_ROOT_PASSWORD
          value: supersecret
      volumeMounts:
        - mountPath: /var/lib/mysql
          name: data
  volumes:
    - name: data
      persistentVolumeClaim:
        claimName: my-volume-claim