Cannot connect to Atlas cluster from minikube

I am using minikube on virtualbox. In my application i am connecting to mongodb atlas cluster using following string

mongodb://:@/filtered_data?retryWrites=true&w=majority

I start a container using following command

docker run --name app -p 80:80 -d <app_image> but for some reason it cannot connect to atlas cluster when i run the above container in minikube

I also tried with srv command but still same issue.

however, when i run same command/container from my mac, it is able to connect to atlas cluster.

I am not sure what is the issue. Could someone help?

1 Like

After few days of experiment, i found out that when i start minikube using “minikube start --driver=virtualbox”, i cannot connect to mongodb atlas cluster using neither mongodb://: url nor mongodb+srv://: url

However if start minikube simply using command “minikube start”, my container can connect to atlas cluster using mongodb+srv://: url

So looks like some issue with virtualbox driver.

I tested same thing with microk8s and my container can connect to atlas cluster using mongodb+srv://: url

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.