World map

 

BM: Baca dalam Bahasa Melayu

World K2: Trays & Orders

Pods: a tray of dishes

You will learn: what a pod is, and what the containers in one pod share.

Checked with Kubernetes 1.37 on 31 Oct 2026

The problem

Nasi lemak is rice, sambal and egg. They leave the kitchen together, on one tray. Your web app needs a small helper right beside it, always. Where should the helper go?

Pick one answer.

Watch

You are here: cluster kind-dev namespace default
kubectl apply sends tray.yaml. The pod tray lands on a stall and becomes Running, READY 1/1. Terminal output: $ kubectl apply -f tray.yaml pod/tray created $ kubectl wait --for=condition=Ready pod/tray --timeout=60s pod/tray condition met $ kubectl get pods NAME READY STATUS RESTARTS AGE tray 1/1 Running 0 4s

A pod: A tray of dishes that always go together: one or more containers. is a tray. It holds one or more containers. Kubernetes puts the whole tray on one stall, never half. kubectl apply -f tray.yaml sends the tray to the food court.

Try it

This tray.yaml has one small slip. Press Apply, read the real error, then fix the line.

Fix the manifest, then press Apply.

tray.yaml11 lines

Try it

Your turn. Send the tray to the food court. Then check it with kubectl get pods.

You are here: cluster kind-dev namespace default
Stalls: 3. Trays: 0 (0 ready). Waiting for a stall: 0.
dev-control-planeOpenManager

No trays here.

dev-workerOpen

No trays here.

dev-worker2Open

No trays here.

Time: +0s (sped up)

Watch

You are here: cluster kind-dev namespace default
The pod duo has two containers. READY shows 2/2. The pod has one IP and sits on one node. Terminal output: $ kubectl apply -f duo.yaml pod/duo created $ kubectl wait --for=condition=Ready pod/duo --timeout=60s pod/duo condition met $ kubectl get pod duo -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES duo 2/2 Running 0 4s 10.244.1.3 dev-worker <none> <none>

Two containers, one tray. READY says 2/2. Look: one IP address, one stall. Inside the tray, they reach each other at localhost.

Predict

You run kubectl delete pod tray. What happens next?

Pick one answer.

Check

Shared by the whole tray, or one per container? Sort them.

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

      You did it!

      You can now explain what a pod is and what it shares.

      Go deeper (optional)

      Most pods hold one container. Add a second only when the two truly belong together. Containers can also share files through a volume (World K4).

      Real rep (optional): use a throwaway kind cluster, never a work one. Read the context before you delete.

      bash
      kind create cluster --name practice
      kubectl config current-context
      kubectl apply -f tray.yaml
      kubectl delete pod tray
      Make a practice cluster, check where you are, send the tray, then delete it.