WIP: Services v2 (ip-per-service)

DO NOT COMMIT.  Needs test updates and a new e2e test.  Some FIXMEs still.  95% complete.

Add support for IP-per-service behavior.  This creates virtual IP addresses for each service, and uses iptables to route traffic "magically".

The first few commits are relatively independent, and could be extracted to different PRs, if you feel like making me suffer.

See #1107 for background.
If you remove port here, you have to assume that the service port ==
container port.  I don't think that is a safe assumption.  BTW, container
port can be a string, which looks up the named port on each pod.

Or did you mean somethign else?



On Mon, Sep 29, 2014 at 3:24 PM, josselin-c <notifications@github.com>
wrote:

> In docs/services.md:
>
> > +## Defining a service
> > +
> > +A `service` in kubernetes is a REST object, similar to a `pod`.  Like a `pod` a
> > +`service` definitions can be POSTed to the apiserver to create a new instance.
> > +For example, suppose you have a set of `pods` that each expose port 9376 and
> > +carry a label "app=MyApp".
> > +
> > +```json
> > +{
> > +  "id": "myapp",
> > +  "selector": {
> > +    "app": "MyApp"
> > +  },
> > +  "containerPort": 9376,
> > +  "protocol": "TCP",
> > +  "port": 8765
>
> I think "port" should be removed here
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/1402/files#r18188117>
> .
>