I have configured minikube and am trying to run kubenetes on my local ubuntu machine.
When I build the MongoDB docker image on my local, I can pass the env variables this way and it works well with the backend API:

```
mongo_db:
    image: mongo:latest
    container_name: db_container
    environment:
      - MONGODB_INITDB_DATABASE=contacts
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=password
    ports:
      - 27017:27017
    volumes:
      - ./mongodb_data_container:/data/db

```

But when I try to run the entire application(frontend, backend, and MongoDB) in Kubernetes, how do I initiate the MongoDB with the env variables so the backend API can connect to the database pod instance? I'm pulling latest mongodb instance, here's the mongo-deployment yaml file:

```
# MongoDB Deployment - Database
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongo
spec:
  selector:
    matchLabels:
      app: mern-stack
  replicas: 1
  template:
    metadata:
      labels:
        app: mern-stack
    spec:
      containers:
        - name: mern-stack
          image: mongo:latest
          ports:
            - containerPort: 27017
          volumeMounts:
            - name: db-data
              mountPath: /data
              readOnly: false
      volumes:
        - name: db-data
          persistentVolumeClaim:
            claimName: mern-stack-data

```

I have tried to pass the env variables this way, but it doesn't seem to work:

```
...
          volumeMounts:
            - name: db-data
              mountPath: /data
              readOnly: false
          env:
            - name: MONGODB_INITDB_DATABASE
              value: "contacts"
            - name: MONGO_INITDB_ROOT_USERNAME
              value: "root"
            - name: MONGO_INITDB_ROOT_PASSWORD
              value: "password"
...

```

What's the quick solution? Should I try config map and secret eventually?