concept

What is a Pod

A Pod groups containers on the same node, sharing network address and ports. Explicitly mounted volumes can share data; emptyDir survives container restarts but not removal of its Pod. A replacement Pod has a new UID.

Formal Syntax & Structure

kubernetes syntaxkubernetes
What is a Pod

Working Example

Example Snippetkubernetes
apiVersion: v1kind: Podmetadata:  name: catalog-pair  namespace: book-labspec:  automountServiceAccountToken: false  restartPolicy: Always  containers:    - name: catalog      image: example.invalid/catalog:1      ports:        - containerPort: 8080      resources:        requests: {cpu: 50m, memory: 32Mi}        limits: {cpu: 100m, memory: 64Mi}      volumeMounts:        - name: shared          mountPath: /work    - name: reader      image: example.invalid/reader:1      resources:        requests: {cpu: 25m, memory: 16Mi}        limits: {cpu: 50m, memory: 32Mi}      volumeMounts:        - name: shared          mountPath: /input          readOnly: true  volumes:    - name: shared      emptyDir: {}
Kubernetes Reference