apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysql-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      component: mysql
  template:
    metadata:
      labels:
        component: mysql
    spec:
      volumes:
        - name: mysql-storage
          persistentVolumeClaim:
            claimName: database-persistent-volume-claim
      containers:
        - name: mysql
          image: sbalasubramanian14/mysqldb
          ports:
            - containerPort: 3306
          volumeMounts:
            - name: mysql-storage
              mountPath: /var/lib/mysql
