https://github.com/moshloop/tcp-loadbalancer
https://github.com/moshloop/tcp-loadbalancer
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/moshloop/tcp-loadbalancer
- Owner: moshloop
- Created: 2019-01-28T15:47:29.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-29T20:34:25.000Z (over 7 years ago)
- Last Synced: 2024-12-28T20:26:29.381Z (over 1 year ago)
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tcp-loadbalancer
Dynamic TCP load balancer using nginx and consul-template. Designed to be used for discovering and load balancing across kubernetes masters.
Loosely modelled after https://github.com/CiscoCloud/haproxy-consul
```bash
docker run --rm -e SERVICE_NAME=cluster-c -e CONSUL_CONNECT=consul:8500 moshloop/tcp-loadbalancer
```
Variable | Description | Default
---------|-------------|---------
`PORT` | The port to listen on | `8443`
`SERVICE_NAME` | The consul service to load balance |
`CONSUL_CONNECT` | The consul connection | `consul.service.consul:8500`
`CONSUL_LOGLEVEL` | Valid values are "debug", "info", "warn", and "err". | `debug`
`CONSUL_TOKEN` | The [Consul API token](http://www.consul.io/docs/internals/acl.html) |