Debug School

Subham Chowdhury
Subham Chowdhury

Posted on

What is Pod by Subham

What is a Pod?

Pods are the atomic unit of work/scheduling. A pod can contain one or more Containers. Pods are atomic in nature. Pods are also ephemeral. Pods have IP and that same IP is applicable for all the containers inside the POD. However each container will have different port for communication. PODs are alive till all the containers are alive. Pods dont have any state. PODS can communicate using POD network. Inside a POD two containers can talk to each other via localhost. We must design one container per pod as best practice. We cannot log into the pod but you can log into the containers in the POD. K8s checks the desired state of the count of the POD . If the number of PODS required is X and current count reported by the Controller Mgr is X-1 then Api server will instruct the scheduler to make it to X and this will continue till the desired state is not met. If in a desired state is to have 1 POD and 5 containers inside and for some reason out if 5 container 1 didn't come up for some reason then the POD becomes useless and the K8s will try to bring up the failed container only but wont fix it.

Top comments (0)