Files
skubelb/README.md
2025-03-29 23:03:54 -07:00

20 lines
753 B
Markdown

# 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:
1. For each line that contains rewrite string:
2. Copy the line once per node IP, replacing the string with host IPs