0
votes

I am using minikube on virtualbox. My node image is 14.10.1 and in my application i am connecting to mongodb atlas cluster using following string

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

I kept kubernetes out of the picture and simply starting a container using

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

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

1 Answers

0
votes

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