Planning Container Tunnel Deployments
Tunnel origins must have their ports exposed through a load balancer, node port, host port mapping, or some other configuration for external accessibility.
All tunnels must have an origin (the point where traffic enters the tunnel) and a destination (the IP/hostname and port where traffic is routed to). Using tunnels in a container environment requires some prior planning to ensure the origins function when the container is launched.
If the tunnel origin uses loopback (127.0.0.1), no port mappings or additional configuration is necessary for the tunnel to work in a Kubernetes or Docker container. If the tunnel origin needs to be accessible from outside the container or pod, there is some additional configuration required for Kubernetes and Docker.
Docker requires that all necessary ports are mapped to the host at runtime. This means that you need to know which ports you want to use for the tunnel origin(s) before you launch the container.
Kubernetes allows you to add, modify, and delete services after a container is launched. This frees you to add and remove tunnel origins as needed: you only need to add or update your service definitions to allow traffic to the origin port. For more information about Kubernetes services, see Kubernetes documentation. An example load balancer configuration for a tunnel origin is provided below.
#Example load balancer service
- name: example-origin
#Remote management port for DxEnterprise and DxOdyssey
- name: management