How is a K8s POD Implemented and what is its core implementation components?

4/16/2019

I have read a lot about K8s PODs. Most of the answers are logical in nature. Even on k8s.io the definition of a POD is as follows:

A Pod is the basic building block of Kubernetes–the smallest and simplest unit in the Kubernetes object model that you create or deploy. A Pod represents a running process on your cluster.

I would like to know what the relationship of a K8s POD is with its core implementation components.

-- Beezer
kubernetes

1 Answer

4/17/2019

Best way to answer the question is to look at the K8s codebase, given the answers above: enter image description here

Here is a snapshot of the Pod*.go listings in the current snapshot of the K8s project. If you look in the container/runtime.go you will see the following:

enter image description here

Perhaps even more importantly, is the runtime.go interface comments: enter image description here

So, it becomes crystal clear, that the runtime of K8s depends on an underlying container runtime that implements the interface for the runtime. In the runtime live the Pods: enter image description here

Therefore, the truth of the answer to the question: Q> How is a K8s POD Implemented and what is its core implementation components? Ans: A K8s Pod is a struct within the K8s runtime-interface that references a group of containers; the core implementation on which a Pod relies is the K8s container-runtime interface that in turn binds to a container-runtime implementation, of which there are many: https://joejulian.name/post/kubernetes-container-engine-comparison/

-- Beezer
Source: StackOverflow