Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swghosh/frp-tunnel-lb
Kubernetes Load Balancer controller based on fast-reverse-proxy tunnel
https://github.com/swghosh/frp-tunnel-lb
edge expose frp go ingress kubernetes reverse-proxy tunnel
Last synced: 15 days ago
JSON representation
Kubernetes Load Balancer controller based on fast-reverse-proxy tunnel
- Host: GitHub
- URL: https://github.com/swghosh/frp-tunnel-lb
- Owner: swghosh
- Created: 2024-03-19T07:56:25.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-22T08:47:27.000Z (5 months ago)
- Last Synced: 2024-11-07T05:56:29.103Z (2 months ago)
- Topics: edge, expose, frp, go, ingress, kubernetes, reverse-proxy, tunnel
- Language: Go
- Homepage:
- Size: 77.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TunnelLB: Kubernetes LoadBalancer controller using reverse proxy tunnels
Expose any k8s Service with zero networking config to the public internet or any network outside the k8s cluster easily. Minimal Kubernetes Load Balancer Controller that works using [fast-reverse-proxy](https://github.com/fatedier/frp) tunnels.Reverse proxy forwards public traffic from outside the cluster to service inside the cluster with no network configuration at all, just Kubernetes pods. Suitable for edge devices running k8s where cloud load balancers cannot be configured and or for networks where service provider's inbound configuration falls short.
More details, coming soon! **FYI: implementation is buggy, do not use in production yet.**
## How to quickly use this?
1. **Tunnel Infra**: Setup a VM (with public external IP, firewall allow traffic on all ports):
eg.
```bash
zone=asia-south1-a
vm_type=e2-medium
vm_name="frps-vm"frps_port="10240"
frps_token=""gcloud compute instances create-with-container "${vm_name}" \
--project=openshift-gce-devel \
--zone=${zone} \
--machine-type=${vm_type} \
--image="projects/cos-cloud/global/images/cos-stable-109-17800-147-22" \
--boot-disk-size=10GB \
--boot-disk-type=pd-balanced \
--boot-disk-device-name=vm-disk \
--container-image="quay.io/swghosh/fast-reverse-proxy:latest" \
--container-restart-policy=always \
--container-arg=--bind-port=${frps_port} \
--container-arg=--kcp-bind-port=${frps_port} \
--container-arg=--token="${frps_token}"
```2. **Tunnel Routing**: Run this inside a pod in the target Kubernetes cluster (it needs access to r/w Service, r/w Deployment, r/w ConfigMaps only):
```bash
go install github.com/swghosh/frp-tunnel-lbFRPS_SERVER_HOST="" \
FRPS_SERVER_AUTH_KEY="" \
FRPS_SERVER_PORT="10240" \
FRP_IMAGE="quay.io/swghosh/fast-reverse-proxy:latest" \
FRP_EXPOSED_HOST="" \
frp-tunnel-lb
```3. **Ingress/Gateway/...**: Use an ingress-controller of your choice (for traffic management inside the cluster), or even Gateway API to distribute traffic through HTTP/TCP Routes. All such implementations are dependent on Kubernetes Service of type LoadBalancer and our controller seamlessly adds the ExternalIP traffic routing to the load balancer service pods.