apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysql
spec:
  selector:
    matchLabels:
      app: mysql
  replicas: 1 # deployment runs 2 pods matching the template
  template: # create pods using pod definition in this template
    metadata:
      labels:
        app: mysql
    spec:
      containers:
      - name: mysql
        image: mysql:5.7
        env: 
        - name: "MYSQL_ROOT_PASSWORD"
          value: "@Pass123"
        volumeMounts:
        - name: mysqldata
          mountPath: /var/lib/mysql
      volumes:
      - name: mysqldata
        hostPath: 
          path: /var/mysqldata
