connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :

7/6/2018

I am running Mongodb pod in kunernetes cluster using nfs volume.I am writing pod.yml like this

enter image description here

but i am getting the below errorenter image description here

Could anybody suggest how to resolve the above issue?

-- gayathri
kubernetes

1 Answer

7/7/2018

I am running Mongodb pod in kunernetes cluster using nfs volume.I am writing pod.yml like this

Putting mongo in the command: is erroneous. The daemon is mongod and the image would have started it automatically had you not provided any command: at all.

Further, all command: lines are exec-ed, so putting bash -c in front of a command is just moving that command out of pid 1 and unnecessarily adding memory consumption to your container.

-- mdaniel
Source: StackOverflow