1
votes

I have a problem to understand the kubernetes workflow: So as I understand the flow:

You have a master which contains etcd, api-server, controller manager and scheduler. You have nodes which contain pods (wich contain containers), kubelet and a proxy.

The proxy is working as a basic proxy to make it possible for a service to communicate with other nodes. When a pod dies, the controller manager will see this (it 'reads' the replication controller which describes how many pods there normally are).

unclear: The controller manager will inform the API-server (I'm not right about this). The API-server will tell the scheduler to search a new place for the pod. After the scheduler has found a good place, the API will inform kubelet to create a new pod.

I'm not sure about the last scenario? Can you tell me the right proces is a clear way? Which component is creating the pod and container? Is it kubelet?

1
Your last question doesn't make sense. It is kubelet that creates pods, and it is kubelet that contacts the docker daemon in order to realize them (because that is how you create a docker container).larsks
You're right, I'll edit itlvthillo
@larsks pls add that as an answer, this should be considered as the right one.Michael Hausenblas

1 Answers

3
votes

So it's the kubelet that actually creates the pods and talks to the docker daemon. If you do a docker ps -a on your nodes (as in not master) in your cluster, you'll see the containers in your pod running. So the workflow is run a kubectl command, that goes to the API server, which passes it to the controller, say that command was to spawn a pod, the controller relays that to the API server which then goes to the scheduler and tells it to spawn the pod. Then the kubelet is told to spawn said pod.

I suggest reading the Borg paper that Kubernetes is based on to better understand things in further detail. http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43438.pdf