Hello,
I am trying to install MongoDB using bitnami charts. Running into authentication error between arbiter and mongodb replicatset. Would appreciate any pointers or links to docs that walks through the process.
Using the following chart:
- name: mongodb
version: "13.6.2"
repository: https://charts.bitnami.com/bitnami
Values.yaml file:
resources: &resources
limits:
cpu: 100m
memory: 500Mi
requests:
cpu: 100m
memory: 100Mi
mongodb:
architecture: replicaset
setParameter:
enableLocalhostAuthBypass: true
auth:
existingSecret: test-mongodb
databases: [test-db1]
usernames: [test-user1]
replicaSetName: test-mongodb
directoryPerDB: true
resources: *resources
persistence:
storageClass: encrypted-gp2
size: 20Gi
pdb:
create: true
labels: &labels
app: test-mongodb
component: db
podAnnotations:
chaos.alpha.kubernetes.io/enabled: "false"
podLabels: *labels
arbiter:
resources: *resources
labels: *labels
podLabels: *labels
podAnnotations:
chaos.alpha.kubernetes.io/enabled: "false"
metrics:
enabled: true
resources: *resources
serviceMonitor:
additionalLabels: *labels
K8s secet:
Data
====
mongodb-passwords: 70 bytes
mongodb-replica-set-key: 668 bytes
mongodb-root-password: 68 bytes
I am getting the following error in arbiter-0:
MongoServerError: Authentication failed.
And the following error in mongodb-0:
{"msg":"Supported SASL mechanisms requested for unknown user","attr":{"user":{"user":"root","db":"admin"}}}
{"msg":"Authentication failed","attr":{"mechanism":"SCRAM-SHA-256","speculative":true,"principalName":"root","authenticationDatabase":"admin","remote":"127.0.0.1:55432","extraInfo":{},"error":"UserNotFound: Could not find user \"root\" for db \"admin\""}}
{"msg":"Authentication failed","attr":{"mechanism":"SCRAM-SHA-1","speculative":false,"principalName":"root","authenticationDatabase":"admin","remote":"127.0.0.1:55432","extraInfo":{},"error":"UserNotFound: Could not find user \"root\" for db \"admin\""}}
Can someone please help.
Thank you, Ahmed