What Is the Difference between a Node and a Pod in Kubernetes?

You are using Kubernetes.  You read about Nodes and Pods.  What is the difference?

A Pod is a collection of one or more containers (e.g., Docker or rkt containers).  A node is a server that is the home of one or more Pods.

"A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine..." (taken from Kubernetes.io).  A Node can support one or more Pods.

"A Pod always runs on a Node." (Taken from Kubernetes.io.) A worker node is the following: kube proxy, kubelet, and a container runtime. A Pod can be defined as an "atomic unit of scheduling" according to page 6 of Kubernetes Patterns by Bilgin Ibryam and Roland Huß (O'Reilly), Copyright 2019 Bilgin Ibryam and Roland Huß, 978-1-492-05028-5.

"Each individual non-master node in your cluster runs two processes:

  1.   kubelet, which communicates with the Kubernetes Master.
  2.   kube-proxy, a network proxy which reflects Kubernetes networking services on each node."

(The numbering of the two items above was introduced for clarity, but the above statements were otherwise quoted from Kubernetes.io.)

To learn more about Pods, see this Kubernetes.io page. Pods are ephemeral (according to page 48 of Kubernetes in Action). A Pod is "the smallest deployable object for building applications" according to this page. The term pod can be a group of Killer Whales; Docker's icon is a whale.

There is a Downward API in Kubernetes which has information about a given pod and its node. You can read more about this component (that has information about pods and nodes) here.

You may want to consider purchasing a book on Kubernetes as it is arguably the most in-demand skill with the greatest potential growth.  Benjamin Franklin said that an investment in knowledge pays the best interest.

Leave a comment

Your email address will not be published. Required fields are marked *