World map

 

BM: Baca dalam Bahasa Melayu

World K1: The Food Court

Anatomy of a manifest

You will learn: the four parts of every Kubernetes order, and the one Kubernetes writes itself.

Checked with Kubernetes 1.37 on 31 Oct 2026

The problem

You are here: cluster kind-dev namespace default
kubectl apply -f tray.yaml creates pod/tray. One small file made a whole tray. Terminal output: $ kubectl apply -f tray.yaml pod/tray created $ kubectl get pods NAME READY STATUS RESTARTS AGE tray 0/1 Pending 0 0s

One small file made this tray. What does each line tell Kubernetes?

Try it

This file is a manifest: An order slip written in YAML: what you want Kubernetes to make.: an order slip written in YAML. Tap its 4 top-level keys. They start at the left edge.

Tap the 4 top-level keys of tray.yaml.

0 of 4 found

Try it

Who writes each part? Sort them.

Drag a card into a box. Or tap the card, then tap the box.

      Watch

      You are here: cluster kind-dev namespace default
      Asking only for status.phase prints: Running. Terminal output: $ kubectl get pod tray -o jsonpath={.status.phase} Running

      spec is what you ordered. status: The part Kubernetes writes: what is really there now. is what Kubernetes sees right now. It is the See box on the manager’s board.

      Predict

      You add replicas: 3 under this Pod’s spec. What happens?

      Pick one answer.

      Try it

      This order is refused. Read the red line, then fix the file until kubectl apply turns green.

      Fix the manifest, then press Apply.

      tray.yaml11 lines

      You did it!

      You can now read the four parts of any manifest.

      Go deeper (optional)

      See every field Kubernetes added. uid, creationTimestamp and the whole status come from the cluster. Don’t copy them back into your file.

      You are here: cluster kind-dev namespace default
      The full pod as stored: your fields, plus many defaults and a status block written by Kubernetes. Terminal output: $ kubectl get pod tray -o yaml apiVersion: v1 kind: Pod metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"labels":{"app":"tray"},"name":"tray","namespace":"default"},"spec":{"containers":[{"image":"nginx:1.29-alpine","name":"web"}]}} creationTimestamp: "2026-10-31T01:00:00Z" generation: 1 labels: app: tray name: tray namespace: default resourceVersion: "465" uid: 9df47b7e-ac53-409c-af1b-7c3199b9b3da spec: containers: - image: nginx:1.29-alpine imagePullPolicy: IfNotPresent name: web resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: kube-api-access-5mrlb readOnly: true dnsPolicy: ClusterFirst enableServiceLinks: true nodeName: dev-worker preemptionPolicy: PreemptLowerPriority priority: 0 restartPolicy: Always schedulerName: default-scheduler securityContext: {} serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 tolerations: - effect: NoExecute key: node.kubernetes.io/not-ready operator: Exists tolerationSeconds: 300 - effect: NoExecute key: node.kubernetes.io/unreachable operator: Exists tolerationSeconds: 300 volumes: - name: kube-api-access-5mrlb projected: defaultMode: 420 sources: - serviceAccountToken: expirationSeconds: 3607 path: token - configMap: items: - key: ca.crt path: ca.crt name: kube-root-ca.crt - downwardAPI: items: - fieldRef: apiVersion: v1 fieldPath: metadata.namespace path: namespace status: conditions: - lastTransitionTime: "2026-10-31T01:00:01Z" status: "True" type: PodReadyToStartContainers - lastProbeTime: null lastTransitionTime: "2026-10-31T01:00:01Z" status: "True" type: Initialized - lastProbeTime: null lastTransitionTime: "2026-10-31T01:00:04Z" status: "True" type: Ready - lastProbeTime: null lastTransitionTime: "2026-10-31T01:00:04Z" status: "True" type: ContainersReady - lastProbeTime: null lastTransitionTime: "2026-10-31T01:00:00Z" status: "True" type: PodScheduled containerStatuses: - containerID: containerd://8ca6a0f98c519efefae4afde2da402928a5f0947fa2f465a1a3f9c3dd11bfb47 image: docker.io/library/nginx:1.29-alpine imageID: docker.io/library/nginx@sha256:634c4c1be1f0a965c7ab54a0c574f9cd9302c552246c081e396ca55fe5e19815 lastState: {} name: web ready: true restartCount: 0 started: true state: running: startedAt: "2026-10-31T01:00:04Z" volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: kube-api-access-5mrlb readOnly: true recursiveReadOnly: Disabled hostIP: 172.18.0.3 hostIPs: - ip: 172.18.0.3 phase: Running podIP: 10.244.1.3 podIPs: - ip: 10.244.1.3 qosClass: BestEffort startTime: "2026-10-31T01:00:01Z"

      Real rep (optional): on your kind cluster, run kubectl get pod tray -o yaml and find the status block.