TL;DR
- SmartNat is a Kubernetes ingress controller for exposing a massive number of TCP/UDP services to the outside world using just 1 server
- available on GitHub: https://github.com/DevFactory/smartnat
SmartNat – Kubernetes ingress controller for TCP/UDP services
Some time ago I wrote posts about writing a very simple Kubernetes controller and using operator framework to create a more complete one. Well, at the same time, I was starting to work on one at the company I’m working for. Meanwhile, I convinced management at the company to release the project as an OpenSource – and here it is!
The project is called SmartNat. It’s a Kubernetes ingress controller for TCP/UDP services that allows you to drive external traffic to your Services. It’s kind of Service with NodePort, but on strong steroids. It runs on a separate instance (well, you can run however you like, but this makes the most sense) and interconnects external (usually public) network with the subnet used by your Kubernetes cluster. SmartNat allows you to use multiple network interfaces, each one having multiple IP addresses to forward traffic from an external network to your services on a port-by-port basis. That way using just a single server or instance you can easily expose hundreds or even thousands of Services. The important property is that all of this is done using L3/L4 tools only, so SmartNat helps where HTTP based Ingresses can’t. Additionally, SmartNat supports simple traffic filtering of traffic coming from external subnet and also HA mode.
If you’re interested, check the project on github: https://github.com/DevFactory/smartnat.