apiVersion: v1
kind: Pod
metadata:
  name: mysql-pod
  labels:
    app: mysql
spec:
  containers:
  - name: mysql-ctr
    image: mysql:5.7
    env:
    - name: MYSQL_USER
      valueFrom:
        secretKeyRef:
          name: mysql-secret
          key: DB_USER
    - name: MYSQL_PASSWORD
      valueFrom:
        secretKeyRef:
          name: mysql-secret  
          key: DB_PASSWORD
    - name: MYSQL_RANDOM_ROOT_PASSWORD
      value: "1"