<p>I have springboot microservice running inside docker container (Kubernetes) which can access  unmanaged services (SQL, Elasticsearch, etc), which are not accessible from my laptop directly, so I'm forced to run commands via kubectl to access them. Is there a posibility to forward TCP connections through docker containers to enable direct access to those service, something like ssh port forwarding?</p>

ernest
<p>For this you have to create a<code>&quot;service without selector&quot;</code>and define<code>endpoints</code>for your &quot;external&quot; resources</p>
<p><a href="https://kubernetes.io/docs/concepts/services-networking/service/#services-without-selectors" rel="nofollow noreferrer">Kubernetes doc on such services here</a></p>
<p>Of  course, your service can be of type<code>&quot;NodePort&quot;</code>, so with the help of your load balancer in front of OCP, you can access the service from outside your cluster and the service will reach your external resource</p>
