apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysql-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mysql-server
  template:
    metadata:
      labels:
        app: mysql-server
    spec:
      containers:
      - name: mysql
        image: mysql:5.6
        env:
          - name: MYSQL_ROOT_PASSWORD
            value: password
        volumeMounts:
        - mountPath: "/var/lib/mysql"
          name: mysql-data
        ports:
        - containerPort: 3086
      volumes:
      - name: mysql-data
        persistentVolumeClaim:
          claimName: mysql-pv-claim
