<commit_before># kuproxy

Proof of concept for a Kubernetes aware external load balancer. Uses
HAproxy under the hood for the actual load balancing.

The idea is to have an haproxy that self configures when a Kubernetes
pod goes online/offline.

For now it just prints a bunch of debug info when a Kubernetes pod
goes online/offline.

## Build

```
go get github.com/coreos/go-etcd/etc
go build
```

## Run

`kuproxy` depends on a
**[Kubernetes](https://github.com/GoogleCloudPlatform/kubernetes)**
cluster.

For now you can use this **[Kubernetes example
cluster](https://github.com/pires/kubernetes-vagrant-coreos-cluster)**.

Find out where the Kubernetes master is running.

```
vagrant ssh master
kubectl cluster-info
```

Then start the load balancer with.

```
kuproxy --master="http://<kubernetes.master.ip>:2379"
```

Check everything is running by launching a Kubernetes pod. For
example:

```
vagrant ssh master
kubectl run-container nginx --image=nginx --replicas=2 --port=80
```

Stop the pod with.

```
vagrant ssh master
kubectl stop rc nginx
```

<commit_msg>Use gb as build tool.<commit_after># kuproxy

Proof of concept for a Kubernetes aware external load balancer. Uses
HAproxy under the hood for the actual load balancing.

The idea is to have an haproxy that self configures when a Kubernetes
pod goes online/offline.

For now it just prints a bunch of debug info when a Kubernetes pod
goes online/offline.

## Pre-requisites

* [gb](https://github.com/constabulary/gb) build tool

## Build

```
gb build all
```

## Run

`kuproxy` depends on a
**[Kubernetes](https://github.com/GoogleCloudPlatform/kubernetes)**
cluster.

For now you can use this **[Kubernetes example
cluster](https://github.com/pires/kubernetes-vagrant-coreos-cluster)**.

Find out where the Kubernetes master is running.

```
vagrant ssh master
kubectl cluster-info
```

Then start the load balancer with.

```
kuproxy --master="http://<kubernetes.master.ip>:2379"
```

Check everything is running by launching a Kubernetes pod. For
example:

```
vagrant ssh master
kubectl run-container nginx --image=nginx --replicas=2 --port=80
```

Stop the pod with.

```
vagrant ssh master
kubectl stop rc nginx
```


{'fraction_non_alphanumeric': 0.10732150977717145, 'fraction_numerical': 0.006366530241018645, 'mean_word_length': 4.301204819277109, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5053596', 'n_tokens_mistral': 751, 'n_tokens_neox': 685, 'n_words': 262}