I'm attempting to deploy a DNP3 server (an industrial protocol) within Kubernetes. DNP3 uses TCP communications but is a stateful protocol. I'm currently working on deploying the ingress controller configuration.
I realize that ingress controllers are intended for http/https traffic, but I'd like to use them if possible and take advantage of some of the inherent features (e.g. mutual TLS, whitelisting, etc.). Does the NGINX ingress controller require that incoming traffic be formatted as http traffic (e.g. having a header, etc.)? If it receives random TCP (non-http) traffic can it simply pass the traffic along to backend service?
The annotations I'm trying to work with include:
ingress.kubernetes.io/auth-tls-secret: default/client-secret
ingress.kubernetes.io/auth-tls-verify-depth: "3"
kubernetes.io/ingress.class: nginx-private
nginx.ingress.kubernetes.io/auth-tls-pass-certificate-to-upstream: "true"
nginx.ingress.kubernetes.io/auth-tls-verify-client: "on"
nginx.org/lb-method: ip_hash
A few notes:
Unfortunately, based on the information I've found, there is no good way to provide Ingress for TCP services, and there seem to be no plans to add that in the nearest feature. Actually, this is still an open issue on GitHub.
There have been some approaches to map TCP or UDP traffic to a Kubernetes service using ConfigMaps described in this StackOverflow question.