keyhole icon indicating copy to clipboard operation
keyhole copied to clipboard

Issue connecting to MongoDB instance in Kubernetes

Open SomniVertix opened this issue 1 year ago • 0 comments

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

SomniVertix avatar Jun 14 '24 15:06 SomniVertix