---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysqld
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mysql
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: mysql
    spec:
      containers:
      - name: mysql
        image: mysql:5.7
        env:
        - name:  MYSQL_ROOT_PASSWORD
          value: "password"
        - name: MYSQL_USER
          value: dba
        - name: MYSQL_PASSWORD
          value: "password"
        - name: MYSQL_DATABASE
          value: crud_in_ci          
        ports:
        - containerPort: 3306
        volumeMounts:
        - name: config-data
          mountPath: "/pod-data"
      volumes:
      - name: config-data
        configMap:
          name: sqldata
          items:
            - key: "sqldata.yaml"
              path: "sqldata.sql"
        
...

  
    

