World map

 

BM: Baca dalam Bahasa Melayu

World K5: Lunch Rush

ResourceQuotas and LimitRanges

You will learn: how to give each zone a budget and a default plate size.

Checked with Kubernetes 1.37 on 31 Oct 2026

The problem

Three teams share one food court. One team orders 50 trays and fills every stall. The others get nothing. How do you stop that?

Pick one answer.

Watch

You are here: cluster kind-dev namespace default
The food-quota budget is created in the food namespace. Nothing is used yet: 0 of 10 pods, 0 of 1 CPU, 0 of 1Gi memory. Terminal output: $ kubectl apply -f quota.yaml resourcequota/food-quota created $ kubectl get resourcequota -n food NAME REQUEST LIMIT AGE food-quota pods: 0/10, requests.cpu: 0/1, requests.memory: 0Gi/1Gi 0s

A ResourceQuota: A zone's budget: the most CPU, memory or trays one namespace may ask for. is a zone’s budget. In total, the food zone may ask for 1 CPU, 1Gi and 10 trays.

Try it

A LimitRange: The zone's default plate size: requests and limits for containers that set none. sets a default plate size. Containers with no requests get these numbers. Tap the line that sets the default CPU request.

Tap the default CPU request.

0 of 1 found

Predict

Each shop tray now asks for 250m CPU. The zone’s budget is 1 CPU. You order 5 trays. How many start?

Pick one answer.

Check

You are here: cluster kind-dev namespace default
shop shows 4 of 5 ready. The FailedCreate event says: exceeded quota food-quota, requested cpu 250m, used 1, limited 1. Terminal output: $ kubectl get deployment shop -n food NAME READY UP-TO-DATE AVAILABLE AGE shop 4/5 4 4 17s $ kubectl get events -n food --field-selector reason=FailedCreate -o jsonpath={.items[0].message} Error creating: pods "shop-68b774968-l9f8m" is forbidden: exceeded quota: food-quota, requested: requests.cpu=250m, used: requests.cpu=1, limited: requests.cpu=1

exceeded quota in plain words: the 5th tray would go over the zone’s budget. So it was never made.

Try it

Make the shop fit the budget: ask for 4 trays. The pink bar shows you are in the food zone.

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

No trays here.

dev-workerOpen
  • shop·5wqrc
  • shop·qwclt
dev-worker2Open
  • shop·6f495
  • shop·s7jmh
Time: +0s (sped up)

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 give a zone a budget and a default plate size.

      Go deeper (optional)

      kubectl describe namespace food shows the budget and what is used. Quotas can also count objects, such as Services or Secrets. A LimitRange can set a min and max too. Then a tray that asks for too much is refused.

      Real rep (optional): make a namespace on kind and add both files. Then order too many trays.