Giter Site home page Giter Site logo

pomaloba's Introduction

Pomaloba

The Poor man's Load Balancer (ie. for bare-metal Kubernetes clusters)

Quick example

cat << EOF > sample.json
{
  "pomaloba": 1,
  "app": "MyApp",
  "endpoints": [ 
    {"ip": "1.2.3.4", "port": 1234 }
  ],
  "destinations": [
    {"ip": "192.168.100.11", "port": 31234 },
    {"ip": "192.168.100.12", "port": 31234 },
    {"ip": "192.168.100.13", "port": 31234 },
    {"ip": "192.168.100.14", "port": 31234 }
  ]
}
EOF

pomaloba --input-spec sample.json

Motivation

Let's say you have your own bare-metal Kubernetes cluster running on your private cloud or even realized using several VM instances merrily running in your own desktop (or laptop these days).

Everything is fine until you deploy a workload consisting in several replicas and want to add a Load Balancer to the mix: A Service of type Load Balancer won't deploy. What do you do now?

Well you could use Services of type NodePort ensuring the traffic will arrive to its destination once you reach the worker nodes but you still want to have a single (IP address, port) endpoint to reach your application.

Thus this Poor Man's Load Balancer exists: just provision a small VM instance with Linux NetFilter enabled and use the Pomaloba output o generate the necesary DNAT and Masquerading actions to make it happen.

For the time being it generates output suitable to be used by iptables but supporting nftables and Ansible should not be too complicated once I wrap my head around it.

pomaloba's People

Contributors

jcborras avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.