Foreman-docker & Kubernetes

Hi list!

I had a chat recently at a conference with Brian Dorsey, who works on
Google Container Engine, and discussed a bit how to integrate Kubernetes
with foreman-docker. He gave me a few good insights, I'll share them here,
please feel free to comment on any point:

Kubernetes host - Users will likely want to create first a Kubernetes host.
To do so, we can either find a way to create a Kubelet per host, or just
use puppet to install Kubernetes. This gives us an endpoint we can use in
the Settings part of Foreman Docker.

Replication controller and service - a convenience to add monitoring and
load balancing for pods. I believe we can either deface the compute
resource Docker and add support for these fields.

Containers - Users with a Kubernetes host should be able to CRUD pods and
labels, and move containers to any pod or apply labels to any existing
container. Non-foreman managed containers should be imported.

Pods - It's really tempting to try to expand the host group concept and put
them under there, hopefully the form will not be as loaded as the host one
and it can be possible. We can extend the API to let a docker host group
(docker container group in reality, so this is a +1 for changing the name
as it was propsed a long time ago) create new containers under the pods
easily. The kubelet API allows for this.

Let me know what you think

Best,

··· -- Daniel Lobato

@elobatoss
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30

> Hi list!
>
> I had a chat recently at a conference with Brian Dorsey, who works on
> Google Container Engine, and discussed a bit how to integrate Kubernetes
> with foreman-docker. He gave me a few good insights, I'll share them here,
> please feel free to comment on any point:
>
> Kubernetes host - Users will likely want to create first a Kubernetes
> host. To do so, we can either find a way to create a Kubelet per host, or
> just use puppet to install Kubernetes. This gives us an endpoint we can use
> in the Settings part of Foreman Docker.
>

is that a compute resource, or a new type of an object?

>
> Replication controller and service - a convenience to add monitoring and
> load balancing for pods. I believe we can either deface the compute
> resource Docker and add support for these fields.
>

why deface? isnt a different thing? e.g. a libvirt compute resource and
openstack both create kvm instances, but are totally different things? I
would suggest if we use a k-host it should represent and work over k-api vs
docker api.

>
> Containers - Users with a Kubernetes host should be able to CRUD pods and
> labels, and move containers to any pod or apply labels to any existing
> container. Non-foreman managed containers should be imported.
>

how does etcd come to play here? does it make sense to expose it or is it
just an internal implementation of kub?

>
> Pods - It's really tempting to try to expand the host group concept and
> put them under there, hopefully the form will not be as loaded as the host
> one and it can be possible. We can extend the API to let a docker host
> group (docker container group in reality, so this is a +1 for changing the
>
name as it was propsed a long time ago) create new containers under the
> pods easily. The kubelet API allows for this.
>

So what does a pod represent? is it a virtual attribute, or does it also
includes physical attributes (such as affinity ?)

>
> Let me know what you think
>
Awesome start - thanks!

Ohad

··· On Mon, Nov 24, 2014 at 11:43 AM, Daniel Lobato wrote:

Best,


Daniel Lobato

@elobatoss
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

>
>
>
>> Hi list!
>>
>> I had a chat recently at a conference with Brian Dorsey, who works on
>> Google Container Engine, and discussed a bit how to integrate Kubernetes
>> with foreman-docker. He gave me a few good insights, I'll share them here,
>> please feel free to comment on any point:
>>
>> Kubernetes host - Users will likely want to create first a Kubernetes
>> host. To do so, we can either find a way to create a Kubelet per host, or
>> just use puppet to install Kubernetes. This gives us an endpoint we can use
>> in the Settings part of Foreman Docker.
>>
>
> is that a compute resource, or a new type of an object?
>

Just a new type of object probably, although it makes sense to point to a
Kubernetes host on the "deploy on:" phase of creating a container.

>
>> Replication controller and service - a convenience to add monitoring and
>> load balancing for pods. I believe we can either deface the compute
>> resource Docker and add support for these fields.
>>
>
> why deface? isnt a different thing? e.g. a libvirt compute resource and
> openstack both create kvm instances, but are totally different things? I
> would suggest if we use a k-host it should represent and work over k-api vs
> docker api.
>
>
Good point.

>> Containers - Users with a Kubernetes host should be able to CRUD pods and
>> labels, and move containers to any pod or apply labels to any existing
>> container. Non-foreman managed containers should be imported.
>>
>
> how does etcd come to play here? does it make sense to expose it or is it
> just an internal implementation of kub?
>

Probably it doesn't make sense to expose just etcd if you have kubernetes
running, maybe in the future we could give a view of etcd as also CoreOS
uses it…

>
>> Pods - It's really tempting to try to expand the host group concept and
>> put them under there, hopefully the form will not be as loaded as the host
>> one and it can be possible. We can extend the API to let a docker host
>> group (docker container group in reality, so this is a +1 for changing the
>>
> name as it was propsed a long time ago) create new containers under the
>> pods easily. The kubelet API allows for this.
>>
>
> So what does a pod represent? is it a virtual attribute, or does it also
> includes physical attributes (such as affinity ?)
>

It just represents a container or a group of containers that share the same
functionality, and possibly volumes too. Hence why I think it more or less
is the same we try to represent with a host group, container group in this
case. Pods + label = container groups. Kubernetes labels can easily be
added as a new kind of parameter.

··· On Tue, Nov 25, 2014 at 7:48 PM, Ohad Levy wrote: > On Mon, Nov 24, 2014 at 11:43 AM, Daniel Lobato > wrote:

Let me know what you think

Awesome start - thanks!

Ohad

Best,


Daniel Lobato

@elobatoss
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Daniel Lobato

@elobatoss
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30