5

The Docs say...

A pod (as in a pod of whales or pea pod) is a group of one or more containers (such as Docker containers), the shared storage for those containers, and options about how to run the containers. Pods are always co-located and co-scheduled, and run in a shared context. A pod models an application-specific “logical host” - it contains one or more application containers which are relatively tightly coupled — in a pre-container world, they would have executed on the same physical or virtual machine.

But I'm unsure if "co-location" means on the same P̶o̶d̶ Node. When satellites are co-located they are "in close proximity so that to reception equipment on the ground they 'appear' to occupy a single orbital position." So, that could be on the same Cluster, not on the same Node.

At the time of posting this, the only info I can find on this issue is at https://platform9.com/blog/compare-kubernetes-vs-ecs/ where it says...

Containers in a single Pod are guaranteed to run on a single Kubernetes node.

Now that sounds pretty conclusive, but I haven't been able to get any corroboration on that anywhere. I want to make sure that they are correct and didn't just misunderstand and spread misinformation.

The reason I'm asking is that it seems like Kubernetes is inherently wasteful if this is true. It is almost certain that your nodes with pods deployed will have resources left over. It is likely that you will have a pod whose needs could be satisfied by the combination of these left over resources. However, if a pod cannot span multiple nodes, you will have to create a new node and have even more un-utilized resources.

  • If you are that short of resources, you needed the new node anyway, and likely two new nodes. – Michael Hampton Oct 19 '16 at 15:48
  • Down voting a question because the answer is "No" is not the Stack Exchange culture. If you would have answered the question, I would have chosen it as "the answer". I didn't ask for a solution to a need. I asked for clarification on a feature that was [at best] merely implied. My intent was to have the answer explicitly laid out in terms that would turn up in Google searches. – Bruno Bronosky Oct 19 '16 at 18:53
  • No, but downvoting for not reading the documentation is very much a Stack Exchange thing. I wasn't going to downvote you, but ... you didn't read the documentation. – Michael Hampton Oct 19 '16 at 19:25
  • It always amazes me how people can conclude that someone didn't read documentation. It was actually after reading that exact page that I posted this question. Specifically the first paragraph of "What is a pod?" And I stated that the feature was implied by the documentation. And I linked to 1 article that I had researched beyond reading the documentation. So no, I did not fail to read the documentation. I just felt that co-location had enough ambiguity that it should be clarified. – Bruno Bronosky Oct 19 '16 at 21:34
  • 1
    You didn't demonstrate that you were even aware that the documentation existed. Now you have, and so I've removed my downvote. – Michael Hampton Oct 20 '16 at 2:39
10

The very idea of pods is that of co-location, that is, being able to define compute-locality where it makes sense (or where it's needed). So, no, per definition, since all containers in a pod will be scheduled on the same node, a pod can not span nodes.

See also my critique of pods here. Having said that, we've introduced the pods concept in DC/OS now with v1.9 as well. There seems to be a certain demand, but my hunch (since I don't have data on it) is that it's mostly a sort of safety blanket for cases where one doesn't or can't go all in, cloud-native wise.

  • 2
    I appreciate this answer. I wasn't sure if co-location was used in the same way as in satelites which would be in the same Cluster, but not necessarily on the same Node. I think this (lack of configurability) is actually a weakness of Pods. I can see a desire to have a unit that you want to share the same fate, but not the same Node. Some Pods would be more expensive to run on a single Node than if the containers were on smaller Nodes. – Bruno Bronosky Oct 19 '16 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.