<p>After deploying a simple API, mongodb is started even without any configuration in the API.</p>
<p><strong>Log error in pod:</strong></p>
<pre><code>2021-11-23 14:45:46  INFO [,,] Located property source: [BootstrapPropertySource {name='bootstrapProperties-configmap.api-products.default'}]
2021-11-23 14:45:47  INFO [,,] The following profiles are active: kubernetes
2021-11-23 14:45:48  INFO [,,] Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
2021-11-23 14:45:48  INFO [,,] Finished Spring Data repository scanning in 5 ms. Found 0 MongoDB repository interfaces.
2021-11-23 14:45:49  INFO [,,] BeanFactory id=15b1d6de-94f9-35c9-8f2b-4562a7a1e1e6
2021-11-23 14:45:49  INFO [,,] Bean 'io.kubernetes.client.spring.extended.manifests.config.KubernetesManifestsAutoConfiguration' of type [io.kubernetes.client.spring.extended.manifests.config.KubernetesManifestsAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-11-23 14:45:49  INFO [,,] Bean 'io.kubernetes.client.spring.extended.network.config.KubernetesLoadBalancerAutoConfiguration' of type [io.kubernetes.client.spring.extended.network.config.KubernetesLoadBalancerAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2021-11-23 14:45:50  INFO [,,] Tomcat initialized with port(s): 8080 (http)
2021-11-23 14:45:50  INFO [,,] Starting service [Tomcat]
2021-11-23 14:45:50  INFO [,,] Starting Servlet engine: [Apache Tomcat/9.0.53]
2021-11-23 14:45:50  INFO [,,] Initializing Spring embedded WebApplicationContext
2021-11-23 14:45:50  INFO [,,] Root WebApplicationContext: initialization completed in 3348 ms
2021-11-23 14:45:52  INFO [,,] Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}
2021-11-23 14:45:52  INFO [,,] Exception in monitor thread while connecting to server localhost:27017
com.mongodb.MongoSocketOpenException: Exception opening socket
    at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70) ~[mongodb-driver-core-4.2.3.jar!/:na]
    at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:143) ~[mongodb-driver-core-4.2.3.jar!/:na]
    at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:188) ~[mongodb-driver-core-4.2.3.jar!/:na]
    at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:144) ~[mongodb-driver-core-4.2.3.jar!/:na]
    at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
    at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:na]
    at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[na:na]
    at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[na:na]
    at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[na:na]
    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:na]
    at java.base/java.net.Socket.connect(Socket.java:609) ~[na:na]
    at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:107) ~[mongodb-driver-core-4.2.3.jar!/:na]
    at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:79) ~[mongodb-driver-core-4.2.3.jar!/:na]
    at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:65) ~[mongodb-driver-core-4.2.3.jar!/:na]
</code></pre>
<p>Besides, <strong>the API is configured to port 8000.</strong></p>

<p>After some testing I found that the problem was the name of the environment variables in the Spring application's yaml file. The most strange was the error about &quot;MongoDB&quot; where i not used it!!!!!!</p>
<p><strong>The solution</strong> was change de variables names.</p>
<p><strong>Be careful the name variables. When similary the environments, can do strange errors</strong></p>
