Smallest practical Pod YAML shape.
Section: Manifest Basics
Minimal Pod manifest
yaml
yaml
apiVersion: v1
kind: Pod
metadata:
name: demo-pod
labels:
app: demo
spec:
containers:
- name: app
image: nginx:1.27
ports:
- containerPort: 80Explanation
A Kubernetes object is typically expressed as YAML with `apiVersion`, `kind`, `metadata`, and `spec`. Pods are usually used directly only for debugging or one-off workloads; Deployments are better for managed application Pods.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Manifest Basics