apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysql-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mysqls
  template:
    metadata:
      labels:
        app: mysqls
    spec:
      containers:
        - name: mysql
          image: mysql:service
          ports:
            - containerPort: 3306
          volumeMounts:
          - name: data
            mountPath: /var/lib/mysql
      volumes:
        - name: data
          persistentVolumeClaim:
              claimName: mysql-pv-claim
                      
