Kubernets Pods
Sandeep Kathar
Technical Support Engineer @ GIP | DevOps Engineer | CI/CD Pipelines | Git, Jenkins, Terraform | AWS Cloud ?? | Linux & Windows Admin | Docker, Kubernetes | Shell Scripting & Python | Immediate Joinee ??
Pod is the basic building block of kuberetes, the smallest deployable unit in the kubernetes that can be created and managed.
Pod is group of one or more containers(such as Docker containers) with shared storage/network, and specification for how to run the containers.
A pod represent a single instance of an application in kubernetes.
Here is manifest for a Pod:
Create a pod:
verify the pod is running:
Edit pod configuration:
Delete a pod:
Pod Lifecycle
Here are the possible values for STATUS:
Pending
The Pod has been accpeted by the Kubernetes system, but one or more of the Container images has not been created. This includeds time before being scheduled as well as time spent donwloading images over the network, which could take a while.
Running
The Pod has been bound to a node , and all of the Containers have been created. At least one container is still running, or is in the process of starting or restarting.
Succeded
All Containers in the POd have terminated in success, and will not be restarted.
Failed
All Containers in the Pod have terminated, and at least one Container has terminated in failure. That is, the container either exited with non-zero status or was terminated by the system.
Unkown
For some reason the state of the pod could not be obtained, typicall due to an error in communicating with the host of the pod.
Completed
The pod has run to compltion as there is nothing to keep it running eg. Completed jobs.
CrashLoopBackOff
This means that one of the contianers in the pod has exited unexpectedly , and perhaps with non-zero error code even after restarting due to restart policy.