DEV Community

sravya-07
sravya-07

Posted on • Edited on

Kubernetes - Part 1 - What are Pods in Kubernetes ?

Pods are the most basic and the smallest unit in Kubernetes. A pod is a grouping of one or more containers.
The container is created using a Docker image. This image can be pulled from public or private repositories.
All the containers in a pod have shared resources. Pods are a Kubernetes abstraction over containers.

In Kubernetes, we rarely work with containers, and we are mainly working with the pod that is running the container. The pod is what is the host for the application.

In order to view all the pods that running in a k8s cluster, the following commands can be used
kubectl get pods # show pods in default namespace
kubectl get pods -n namespace-name # show pods in a particular namespace
kubectl get pods -A # show pods in all namespaces
kubectl get pods --all-namespaces # show pods in all namespaces

Top comments (0)