---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: percona
spec:
  selector:
    matchLabels:
      app: percona
  template:
    metadata:
      labels:
        app: percona
    spec:
      containers:
      - image: percona
        name: percona
        env:
          # Use secret in real usage
        - name: MYSQL_ROOT_PASSWORD
          value: password
        ports:
        - containerPort: 3306
          name: percona
        volumeMounts:
        - name: percona-volume
          mountPath: /var/lib/mysql
      volumes:
        - name: percona-volume
          persistentVolumeClaim:
            claimName: percona-pvc-gp2
