eac109379ef0647afb58669ed4a9015b1e4ddcac
A simple Kubernetes load balancer
Configures nginx to forward connections to your node IPs. Services should be declared as NodePort, which means that they open a port on all nodes. When the request lands on any node, it is forwarded to the correct pod via the network mesh kubernetes is using. In theory, there is one a hop penalty.
But lets be honest. You're running with a single LB, probably a GCE free tier N1 VM. That extra hop doesn't matter.
Config
Configure nginx to do what you want, test it. Use any Node IP for your testing. This tool accepts an argument (rewrite_string) which will be replaced using these rules:
- For each line that contains rewrite string:
- Copy the line once per node IP, replacing the string with host IPs
Description
Languages
Rust
95.2%
Makefile
3.1%
Dockerfile
1.7%