Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aledbf/kube-haproxy-router
https://github.com/aledbf/kube-haproxy-router
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aledbf/kube-haproxy-router
- Owner: aledbf
- Created: 2015-08-03T13:54:38.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-01T21:09:56.000Z (about 9 years ago)
- Last Synced: 2024-04-14T16:09:07.223Z (9 months ago)
- Language: Go
- Size: 2.88 MB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## DEPRECATED
# The contents of this repository is in this [kubernetes/contrib](https://github.com/kubernetes/contrib/tree/master/service-loadbalancer) repository
# kube-haproxy-router
Replace nginx to avoid kube-proxy to reach a pod.
`Internet-> Nginx -> iptables (VIP) -> kube-proxy -> go LB -> flannel -> docker bridge -> pod/s`
with
`Internet -> kube-haproxy -> flannel -> docker bridge -> pod/s`
**Changes:**
- remove nginx
- do not use service VIP to reach a pod
- use the name of the application (hostname) to route traffic
- use haproxy checksThis borrow ideas from #12111 and #11679 in `github.com/GoogleCloudPlatform/kubernetes`
**Content type**
Some applications, like a REST API always return json content. In this cases it makes sense to also return error (404,408,502,503 and 504) in the same format.
Any `kubernetes` service with the label `content=json` will return a json response in case of an error.```
docker run \
--name kube-haproxy \
--rm \
-p 80:80 \
-p 443:443 \
-p 1936:1936 \
-p 2222:2222 \
-p 8081:8081 \
-v /dev/log:/dev/log \
aledbf/kube-haproxy-router:v0.0.1 \
/kube-haproxy \
--master http://$(etcdctl get /deis/scheduler/k8s/master):8080 \
--domain=$(etcdctl get /deis/platform/domain) \
--nodes=$(fleetctl list-machines -fields=ip -no-legend | xargs | sed -e 's/ /,/g')
```