Your first pod
Run something, then look at it.
In plain terms
Running your first pod is like pressing “play” — you ask Kubernetes to start one small thing, then peek behind the curtain to see where it landed and whether it’s happy.
Enough theory — let us run something. There are two ways: a quick one-liner for experiments, and the “real” way where you write a small file and apply it. Both start the same tiny web server.
terminal
# the quick way — great for a throwaway experiment$ kubectl run web --image=nginx$ kubectl get podsNAME READY STATUS RESTARTS AGEweb 1/1 Running 0 8s$ kubectl logs web
The real way: a file you apply
In practice you write the desired state in a small YAML file and apply it, so it lives in git and can be reviewed and re-run. This is the declarative habit the whole course builds on — the file is the source of truth.
pod.yaml
apiVersion: v1kind: Podmetadata:name: webspec:containers:- name: webimage: nginx:1.25---# then: kubectl apply -f pod.yaml
Two statuses you will meet early
Pending means the pod has not been placed on a node yet. ImagePullBackOff means the image name or tag is wrong. kubectl describe pod web tells you which — read the Events line.