<p>I am running Kafka connect worker from Openshift cluster and able to access the connector APIs from the PODs terminal like below (listener in <code>connect-distributed.properties</code> as <code>https://localhost:20000</code>):</p>
<pre><code>sh-4.2$ curl -k -X GET https://localhost:20000
{&quot;version&quot;:&quot;5.5.0-ce&quot;,&quot;commit&quot;:&quot;dad78e2df6b714e3&quot;,&quot;kafka_cluster_id&quot;:&quot;XojxTYmbTXSwHguxJ_flWg&quot;}
</code></pre>
<p>I have created OpenShift routes with below config:</p>
<pre><code>- kind: Route
    apiVersion: v1
    metadata:
      name: '${APP_SHORT_NAME}-route'
      labels:
        app: '${APP_SHORT_NAME}'
      annotations:
        description: Route for application's http service.
    spec:
      host: '${APP_SHORT_NAME}.${ROUTE_SUFFIX}'
      port:
        targetPort: 20000-tcp
      tls:
        termination: reencrypt
        destinationCACertificate: '${DESTINATION_CA_CERTIFICATE}'
      to:
        kind: Service
        name: '${APP_NAME}-service'
</code></pre>
<p>Port 20000 is exposed from Dockerfile but the route URL is throwing below error instead:</p>
<pre><code>Possible reasons you are seeing this page:

The host doesn't exist. Make sure the hostname was typed correctly and that a route matching this hostname exists.

The host exists, but doesn't have a matching path. Check if the URL path was typed correctly and that the route was created using the desired path.

Route and path matches, but all pods are down. Make sure that the resources exposed by this route (pods, services, deployment configs, etc) have at least one pod running
</code></pre>
<p>Same OpenShift route URL works fine with a normal Spring boot service but Kafka connect worker URL is not getting bind to the Route URL create as above. (Note the Kafka connect worker is running fine along with the logs in the OpenShift pods)</p>

Smith
<p>Set the <code>listeners</code> back to the default of bind-address <code>0.0.0.0</code> so that external connections can be accepted.</p>
<p>If you need a different port, you can use port forwarding in the k8s service, rather than do that at the application config.</p>
<p>If you're not using Strimzi (which doesn't look like you are, based on <code>5.5.0-ce</code>), you'll also want to add this env-var so a cluster can be formed.</p>
<pre class="lang-yaml prettyprint-override"><code>- name: CONNECT_REST_ADVERTISED_HOST_NAME
  valueFrom:
    fieldRef:
      fieldPath: status.podIP
</code></pre>
