Non-HTTP(s) Istio Ingress
As noted in the Istio Ingress document, UDS Core by default provides gateway configuration to handle HTTP(s) ingress traffic only. This document provides example configuration and resources to setup ingress for a non-http service (using SSH for the example below). Note that while this example uses port 22 and the SSH protocol this same process should work for an TCP port/protocol that your service is listening on.
UDS Core Configuration
In order to allow ingress for a non-HTTP service you first need to configure the UDS Core loadbalancers to accept traffic on a different port. This can be done via an override to the configuration for the admin or tenant loadbalancers, as shown in the example below for the tenant loadbalancer to add port 22:
Note that you MUST include the default list of ports (as shown above) to ensure that HTTP traffic and liveness checks continue to function as expected. You can choose any port
and targetPort
for your additional configuration that you want.
Gateway Custom Resource
In order to allow exposing services through the newly opened loadbalancer port you must also create an Istio Gateway custom resource that specifies the hosts and port that you want to configure the gateway to accept requests for. The below example shows how to do this for example.uds.dev
on our SSH port of 22:
VirtualService Custom Resource
Now that the loadbalancer and Istio Gateway are configured for the right ports and host, you will just need to add a route (VirtualService
) to ensure traffic is directed to the right cluster service when requests come to your host and port. The example below does this for our example.uds.dev
host:
Assuming you are running with strict network policies you will also need to add a network policy to allow ingress on this same port. You can do this in the Package CR like the example below:
With these steps complete you should be able to hit your application over the port you configured on the configured host, so in our case we should be able to run: