```apiVersion: apps/v1 kind: Deployment metadata: ...
# kubernetes
m
Copy code
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mongo-express-bpe
  namespace: mongodb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mongo-express-bpe
  template:
    metadata:
      labels:
        app: mongo-express-bpe
    spec:
      containers:
      - image: mongo-express
        imagePullPolicy: Always
        name: mongo-express
        env:
          - name: ME_CONFIG_MONGODB_ADMINUSERNAME
            value: "root"
          - name: ME_CONFIG_MONGODB_ADMINPASSWORD
            value: ""
          - name: ME_CONFIG_BASICAUTH_USERNAME
            value: "mongodb"
          - name: ME_CONFIG_BASICAUTH_PASSWORD
            value: "mongodb"
          - name: ME_CONFIG_MONGODB_ENABLE_ADMIN 
            value: "true"
          - name: ME_CONFIG_MONGODB_AUTH_DATABASE 
            value: "admin?replicaset=bd0"
          - name: ME_CONFIG_MONGODB_AUTH_USERNAME 
            value: "root"
          - name: ME_CONFIG_MONGODB_AUTH_PASSWORD 
            value: ""
          - name: ME_CONFIG_MONGODB_SERVER
            value: ""
        ports:
          - containerPort: 8081
            name: webb
        resources:
          requests:
            memory: "64Mi"
            cpu: "200m"
          limits:
            memory: "128Mi"
            cpu: "500m"
        livenessProbe:
         tcpSocket:
           port: 8081
         initialDelaySeconds: 600
         periodSeconds: 10
        readinessProbe:
         tcpSocket:
           port: 8081
         initialDelaySeconds: 30
         periodSeconds: 10
d
HI Mattias, thanks for reaching out. The error still persist after trying this out, and it even crashed my mongo-db server. If you do not mind, I can share the whole file. Thanks.
HI @Mattias Hemmingsson here's a link to the whole file on Github. Please help me check it out in your spare, thanks.
m
You need to update the deployment with the values from your mongodb secrets as well
and remove this part
Copy code
- name: ME_CONFIG_MONGODB_AUTH_DATABASE 
            value: "admin?replicaset=bd0"