World map

 

BM: Baca dalam Bahasa Melayu

World K2: Trays & Orders

Requests and limits

You will learn: how requests book room on a node, and how limits cap what a container uses.

Checked with Kubernetes 1.37 on 31 Oct 2026

The problem

One greedy tray eats all of a stall’s memory. The trays beside it starve and crash. How do you stop that?

Pick one answer.

Watch

A request (resources): The shelf space a container books. The scheduler only places a pod where it fits. is the shelf space a tray books. The scheduler puts a tray only where its request fits. Fit these trays on the stalls.

Tap a tray, then tap a stall. Or drag the tray.

Waiting trays

  • stall-a
    CPU 0 of 2
    Memory 0Mi of 4Gi
    • stall-b
      CPU 0 of 2
      Memory 0Mi of 4Gi
      • Pending

        Trays that fit on no stall wait here.

        Watch

        Requests and a limit (resources): The most a container may use. Over the CPU limit: slowed. Over the memory limit: killed. sit in each container.

        resources:
          requests:
            cpu: 100m
          limits:
            memory: 128Mi

        Which does the scheduler use to pick a stall?

        Pick one answer.

        Try it

        big asks for 64 CPUs. Real error: Insufficient cpu. Plain words: no stall is that big, so it waits in Pending forever. Ask for a tenth of a CPU.

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

        No trays here.

        dev-workerOpen

        No trays here.

        dev-worker2Open

        No trays here.

        Waiting for a stall
        • big·k9g8fPending
        Time: +0s (sped up)

        Predict

        A tray reaches its CPU limit. What happens to it?

        Pick one answer.

        Try it

        A request bigger than its limit makes no sense. Kubernetes refuses it. Fix one number.

        Fix the manifest, then press Apply.

        web.yaml14 lines

        Check

        True or not? Sort each sentence.

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

            You did it!

            You can now book room with requests and cap use with limits.

            Go deeper (optional)

            CPU is counted in cores: 1000m is 1 CPU. Memory uses Mi and Gi (1Gi is 1024Mi). kubectl top pods (World K5) shows live use, so you can pick fair numbers.

            Real rep (optional): on a throwaway cluster, ask for 64 CPUs. Then read the Events.