Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
135 views
in Technique[技术] by (71.8m points)

Does Kubernetes pods run inside container runtime?

I think both CR and Pod run in a Kubernetes Node which can be a physical machine or a VM. Knowing that pod is a shared namespace for container and Container Runtime runs container does this means that Container Runtime runs pod which then runs a container or?

I'm just trying to picture these two and understand how they both work.

question from:https://stackoverflow.com/questions/65830180/does-kubernetes-pods-run-inside-container-runtime

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

CR only runs single containers. Pods can hold more than one container. A pod is a shared-namespace and administrative domain that is intended to hold a single 'main' service in a single container with a number of supporting containers running alongside it. The pod is a little more than a virtual construct though, as its existence results in physical changes in name resolution, routing tables, storage, and the like.

A pod though may have many instances that run on one or more nodes. A node can be thought of as a physical computer, though often it's a VM.

Things get more complicated when looking at KinD (Kubernetes in Docker) type solutions, such as KinD itself, or K3D, where you're running the kubernetes control-plane and all of the nodes themselves as containers. In this case, things are a bit 'inception' like, but for the most part, they are modelled exactly as normal kubernetes and you can ignore the strangeness and assume that you're not really inside docker (or any other container runtime) and just work with the concepts.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...