NautilusLB is a lightweight, dynamic TCP load balancer for Kubernetes
866
NautilusLB is an open-source Layer 4 (TCP) load balancer designed for high availability and scalability in Kubernetes environments. It intelligently distributes incoming TCP traffic across multiple backend servers based on Kubernetes service definitions and custom annotations.
Unlike traditional cloud load balancers, NautilusLB implements a reverse discovery pattern. Instead of services exposing themselves externally, NautilusLB actively discovers services from within the Kubernetes cluster and presents them externally. This leads to significant advantages in efficiency, security, and cost.
nautiluslb.cloudresty.io/enabled: "true".
The following example demonstrates how to run NautilusLB using a Docker container.
Prerequisites:
config.yaml file available.kubeconfig file.docker run --detach \
--name nautiluslb \
--hostname nautiluslb \
# Mount your configuration file
--volume /path/to/your/config.yaml:/nautiluslb/config.yaml \
# Mount your kubeconfig
--volume /path/to/your/kubeconfig:/root/.kube/config \
--restart unless-stopped \
# Publish the ports you defined in your config.yaml
--publish 80:80 \
--publish 443:443 \
cloudresty/nautiluslb:latest
Note: For production deployments, it is highly recommended to use a specific version tag instead of latest.
NautilusLB is configured using a YAML file named config.yaml. This file defines which ports to listen on and which backend Kubernetes services to target.
Example config.yaml:
configurations:
- name: http_traffic_configuration
listenerAddress: ":80"
backendPortName: "http"
- name: https_traffic_configuration
listenerAddress: ":443"
backendPortName: "https"
- name: mongodb_internal_service
listenerAddress: ":27017"
backendPortName: "mongodb"
namespace: "development"
For a full list of parameters, please see the configuration section on GitHub.
NautilusLB discovers services that are marked for load balancing using a specific annotation: nautiluslb.cloudresty.io/enabled: "true".
Simply add this annotation to any Kubernetes service you want NautilusLB to manage.
Example NGINX Service:
apiVersion: v1
kind: Service
metadata:
name: ingress-nginx-controller
namespace: ingress-nginx
annotations:
nautiluslb.cloudresty.io/enabled: 'true'
spec:
ports:
- name: http
port: 80
- name: https
port: 443
selector:
app.kubernetes.io/name: ingress-nginx
type: NodePort
An open source project brought to you by the Cloudresty team.
Website | LinkedIn | BlueSky | GitHub | Docker Hub
Content type
Image
Digest
sha256:961e9497e…
Size
49.9 MB
Last updated
about 1 year ago
docker pull cloudresty/nautiluslb