Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue connecting to MongoDB instance in Kubernetes #117

Open
SomniVertix opened this issue Jun 14, 2024 · 0 comments
Open

Issue connecting to MongoDB instance in Kubernetes #117

SomniVertix opened this issue Jun 14, 2024 · 0 comments

Comments

@SomniVertix
Copy link

I cannot seem to connect keyhole to databases that are deployed in kubernetes. I've tried the following two ways:

  • Kubectl forward port: Forwarding the mongodb port from one of the mongo pods to my localhost. When doing this I get errors about keyhole trying to connect to the other mongo pods:
Thread3existing withserver selection error: server selection timeout, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: mongodb-0.mongodb.test-mongo.svc.cluster.local:27017, Type: Unknown, Last error: dial tcp: lookup mongodb-0.mongodb.test-mongo.svc.cluster.local: no such host }, { Addr: mongodb-1.mongodb.test-mongo.svc.cluster.local:27017, Type: Unknown, Last error: dial tcp: lookup mongodb-1.mongodb.test-mongo.svc.cluster.local: no such host }, { Addr: mongodb-2.mongodb.test-mongo.svc.cluster.local:27017, Type: Unknown, Last error: dial tcp: lookup mongodb-2.mongodb.test-mongo.svc.cluster.local: no such host }, ] }
  • Deploying a pod into the kubernetes cluster that then connects to mongo using the cluster dns: When trying this, I get an authentication error:
Thread2existing withconnection pool for mongodb-2.mongodb.comm-kore-ai-yellow.svc.cluster.local:27017 was cleared because another operation failed with: connection() error occurred during connection handshake: auth error: unable to authenticate using mechanism "SCRAM-SHA-256": (AuthenticationFailed) Authentication failed.

Im not really sure how else to monitor this workload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant