apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: mysql
    app.kubernetes.io/component: mysql
    app.kubernetes.io/name: mysql
  name: mysql
  namespace: kubeflow
spec:
  selector:
    matchLabels:
      app: mysql
      app.kubernetes.io/component: mysql
      app.kubernetes.io/name: mysql
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: mysql
        app.kubernetes.io/component: mysql
        app.kubernetes.io/name: mysql
    spec:
      containers:
      - env:
        - name: MYSQL_ALLOW_EMPTY_PASSWORD
          value: "true"
        image: gcr.io/ml-pipeline/mysql:5.6
        name: mysql
        ports:
        - containerPort: 3306
          name: mysql
        volumeMounts:
        - mountPath: /var/lib/mysql
          name: mysql-persistent-storage
      volumes:
      - name: mysql-persistent-storage
        persistentVolumeClaim:
          claimName: mysql-pv-claim
