I have a simple setup in kubernetes hosting a NodeJS application using deployment + service and a mongo with its own deployment + service available in the same kubernetes cluster.
My problem is how do I get the mongo ip into my nodeJS env file as : DB_URL=mongo:27017/test via mongo´s kubernetes env to the nodeJS app ENV?
I assume the Service IP for mongo is not constant and may change.