Pods are a atomic, group of one or more containers, with shared storage and network resources, and a specification for how to run the containers.
A Pod is similar to a set of containers with shared namespaces and shared filesystem volumes.
Pods are attached to a container runtime to run containers. Docker is the most commonly known runtime but there are other options such as containerd and cri-o.
Pods are generally not created directly since they are design to be disposable. Instead, we abstract Pods using workloads, such as Deployment, Job or StatefulSet.
It is very important to understand Pod lifecycle and how it works. There is a separed topic where we talk about lifecycle. You can read it here.
The diagram below illustrates how Pods are created in Kubernetes:
Pods are crated using the Kubernetes specification v1.Pod.
A minimal example can be found in the pod.yaml
file.