apiVersion: v1
kind: Pod
metadata:
  name: mysql-db
spec:
 containers:
 - name: db
   image: mysql
   env:
   - name: DB_USER
     valueFrom:
       secretKeyRef:
         name: db-creds
         key: db_user
   - name: DB_PASSWORD
     valueFrom:
       secretKeyRef:
         name: db-creds
         key: db_password  
   - name: DB_HOST
     valueFrom:
       secretKeyRef:
         name: db-creds
         key: db_host
   command: ["/bin/sh"]
   args: ["-c","mysql -u $DB_USER -p$DB_PASSWORD -h $DB_HOST"]
 
---
apiVersion: v1
kind: Secret
metadata:
  name: db-creds
type: Opaque
data:
  db_user: verfEr=
  db_password: USKoTJCpGJGteNmk=
  db_host: NUthe3c=
