apiVersion: v1
kind: Pod
metadata:
  name: nginx-pod-configmap-env
spec:
  containers:
    - name: nginx
      image: nginx:1.16
      env:
        - name: DB_USER_CONFIG
          valueFrom:
            configMapKeyRef:
              name: database-config
              key: user
        - name: DB_PASSWORD_CONFIG
          valueFrom:
            configMapKeyRef:
              name: database-config
              key: password
      envFrom:
        - configMapRef:
            name: env-config
