apiVersion: v1
kind: Pod
metadata:
  name: mysql
  labels:
    app: mysql
spec:
  containers:
  - name: mysql
    image: mysql:8.0
    command: ["docker-entrypoint.sh", "mysqld", "--default-authentication-plugin=mysql_native_password"]
    ports:
    - containerPort: 3306
    env:
    - name: MYSQL_DATABASE
      value: roundcubemail
    - name: MYSQL_USER
      value: roundcube
    - name: MYSQL_PASSWORD
      value: "123456789"

    - name: MYSQL_ROOT_PASSWORD
      value: "123456789"
    volumeMounts:
    - name: mysql
      mountPath: "/var/lib/mysql"
  volumes:
  - name: mysql
    persistentVolumeClaim:
      claimName: mysql
