<p>I want to run multiple instances of same pod in the same node in the Kubernetes. I am using a wildfly docker image for this. When running more than one pod in the same node, I am getting port conflict exception.</p>
<pre><code>2020-11-30 15:53:17,079 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (&quot;add&quot;) failed - address: ([
(&quot;core-service&quot; =&gt; &quot;management&quot;),
(&quot;management-interface&quot; =&gt; &quot;http-interface&quot;)
]) - failure description: {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;org.wildfly.management.http.extensible&quot; =&gt; &quot;java.net.BindException: Address already in use /0.0.0.0:9990&quot;}}
2020-11-30 15:53:17,259 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (&quot;add&quot;) failed - address: ([
(&quot;subsystem&quot; =&gt; &quot;undertow&quot;),
(&quot;server&quot; =&gt; &quot;default-server&quot;),
(&quot;http-listener&quot; =&gt; &quot;default&quot;)
]) - failure description: {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;org.wildfly.undertow.listener.default&quot; =&gt; &quot;Address already in use /0.0.0.0:9575&quot;}}
2020-11-30 15:53:17,260 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (&quot;add&quot;) failed - address: ([
(&quot;subsystem&quot; =&gt; &quot;undertow&quot;),
(&quot;server&quot; =&gt; &quot;default-server&quot;),
(&quot;https-listener&quot; =&gt; &quot;https&quot;)
]) - failure description: {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;org.wildfly.undertow.listener.https&quot; =&gt; &quot;Address already in use /0.0.0.0:8553&quot;}}
2020-11-30 15:53:17,262 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (&quot;add&quot;) failed - address: ([
(&quot;core-service&quot; =&gt; &quot;management&quot;),
(&quot;management-interface&quot; =&gt; &quot;http-interface&quot;)
]) - failure description: {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;org.wildfly.management.http.extensible&quot; =&gt; &quot;java.net.BindException: Address already in use /0.0.0.0:9990&quot;}}
2020-11-30 15:53:17,399 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0028: Stopped deployment demo.war (runtime-name: demo.war) in 133ms
2020-11-30 15:53:17,416 ERROR [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0021: Deploy of deployment &quot;demo.war&quot; was rolled back with the following fai
lure message: undefined  
</code></pre>
<p>So how can i bypass this issue and run multiple instances without port conflits??</p>

Bruce wayne - The Geek Killer
<p>Ports of different pods may collide only if you use <code>hostPort</code> or <code>hostNetwork</code>. Otherwise, you shouldn't encounter any issues while running multiple identical pods in the same node.</p>
<p>You can just try to run the following commands. Your Wildfly pods should run without any issues because the ports they use are inside the containers.</p>
<pre><code>kubectl run wildfly --image=jboss/wildfly
kubectl run wildfly-2 --image=jboss/wildfly
kubectl run wildfly-3 --image=jboss/wildfly
</code></pre>
<p>If you need to use <code>hostPort</code> or <code>hostNetwork</code> (which is not recommended), then you're on your own here, and you need to &quot;orchestrate&quot; ports on your own.</p>
