Skip to content

Pod

Pod It is the unit of deployment. Pasted image 20231004123024.png - they do not have the capability to self-heal themselves - pods is used with controllers/operators, that handle Pods' replication, fault tolerance, self-healing, etc. - containers share an IP address, access to storage and namespace - containers are started in parallel by default. "initContainers" can be used to ensure some containers are ready before other. - to communicate with each other containers can use the loopback interface,  a shared filesystem, IPC 2023100715543131 K8s Single IP per Pod - a common reason to have multiple containers in a Pod is for logging(sidecar) - controllers: Deployments, ReplicaSets, DaemonSets, Jobs, etc - usually on container is an applications, other support the application How to create new pod:

kubectl run newpod --image=nginx --generator=run-pod/v1
kubectl create -f newpod.yaml
Delete pod:
kubectl delete -f newpod.yaml
Get pods
kubectl get pods

References

  1. LinuxFoundationX LFS158x.1. Chapter 8. Kubernetes Building Blocks
  2. https://trainingportal.linuxfoundation.org/courses/kubernetes-for-developers-lfd259 Kubernetes Architecture