You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploy mongodb with mTLS enabled and custom certificates.
Certificate extensions look like this, and incrementing the number for each pod:
DNS.1 = mongodb-headless
DNS.2 = mongodb-0
DNS.3 = mongodb-0.mongodb-headless.mongo-test.svc.cluster.local
No metrics in Prometheus because mongodb_exporter connects to localhost instead of the actual pod hostname. Adding "localhost" to the certificates is not really an option.
time="2025-02-26T19:12:36Z" level=error msg="Cannot connect to MongoDB: cannot connect to MongoDB: server selection error: server selection timeout, current topology: { Type: Single, Servers: [{ Addr: localhost:27017, Type: Unknown, Last error: tls: failed to verify certificate: x509: certificate is valid for mongodb-headless, mongodb-0, mongodb-0.mongodb-headless, mongodb-0.mongodb-headless.mongo-test.svc.cluster.local, not localhost }, ] }"
Additional information
Everything else works just fine with our custom certificates
The text was updated successfully, but these errors were encountered:
Thank you for opening this issue and submitting the associated Pull Request. Our team will review and provide feedback. Once the PR is merged, the issue will automatically close.
Name and Version
bitnami/mongodb 16.4.5
What architecture are you using?
None
What steps will reproduce the bug?
Deploy mongodb with mTLS enabled and custom certificates.
Certificate extensions look like this, and incrementing the number for each pod:
DNS.1 = mongodb-headless
DNS.2 = mongodb-0
DNS.3 = mongodb-0.mongodb-headless.mongo-test.svc.cluster.local
Are you using any custom parameters or values?
What is the expected behavior?
Metrics in Prometheus.
What do you see instead?
No metrics in Prometheus because mongodb_exporter connects to localhost instead of the actual pod hostname. Adding "localhost" to the certificates is not really an option.
Additional information
Everything else works just fine with our custom certificates
The text was updated successfully, but these errors were encountered: