Skip to content
StackDecode
BeginnerLesson 3 of 35

Pods

The smallest deployable unit: one or more containers sharing network and storage.

yaml
apiVersion: v1
kind: Pod
metadata:
  name: hello
spec:
  containers:
    - name: web
      image: nginx:1.27
      ports:
        - containerPort: 80
bash
kubectl apply -f pod.yaml
kubectl get pods -o wide
kubectl describe pod hello
kubectl delete pod hello

Containers in a pod share one IP and can talk over localhost. Pods are ephemeral: if one dies it is not resurrected under the same identity. That is why you rarely create bare pods and use a Deployment instead.