You are looking at the documentation of a prior release. To read the documentation of the latest release, please
visit here.
New to Voyager? Please start here.
TCP LoadBalancing
TCP load balancing is one of the core features of Voyager Ingress. Voyager can handle TCP Load balancing with or without TLS. One Voyager Ingress can also be used to load balance both HTTP and TCP.
One Simple TCP Rule Would be:
apiVersion: voyager.appscode.com/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  namespace: default
spec:
  tls:
  - secretName: mycert
    hosts:
    - other.example.com
  rules:
  - host: one.example.com
    tcp:
      port: '9898'
      backend:
        serviceName: tcp-service
        servicePort: '50077'
  - host: other.example.com
    tcp:
      port: '7878'
      backend:
        serviceName: tcp-service
        servicePort: '50077'
  - host: other.example.com
    tcp:
      port: '7800'
      noTLS: true
      backend:
        serviceName: tcp-service
        servicePort: '50077'
For this Ingress, HAProxy will open up 3 separate ports:
port 9898: Passes traffic to pods behind tcp-service:50077. Uses no TLS, since
spec.TLSdoes not have a matching host.port 7878: Passes traffic to pods behind tcp-service:50077. Uses TLS, since
spec.TLShas a matching host.port 7880: Passes traffic to pods behind tcp-service:50077. Uses no TLS, even though
spec.TLShas a matching host. This is becausetcp.noTLSis set to true for this rule.
Restrictions
- For one Ingress, you cannot have multiple 
tcprules listening to same port, even if they do not have samehost. 






