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: 80bash
kubectl apply -f pod.yaml
kubectl get pods -o wide
kubectl describe pod hello
kubectl delete pod helloContainers 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.