← Kubernetes: operate workloads and recover services
11 / 12 · 70 MIN

Admission, scheduling and quotas

Distinguish a Pod rejected before creation from an accepted Pod that cannot be placed, using actual state and messages.

Locate the failure stage

A creation request can be rejected before producing a Pod, or accepted and left without placement. The lab demonstrates both outcomes. In the first case, the client receives Forbidden because of an admission constraint and a subsequent query confirms that the object does not exist.

In the second, a Pending Pod exists with PodScheduled=false and reason Unschedulable. These distinctions guide investigation: do not search for a process crash when no process started, or change the scheduler to solve a quota rejecting creation.

Preserve the specific message and check object existence in the correct context and namespace.

Selector without a matching node

Pod placement requests a pool label absent from the experiment’s only node. The scheduler keeps the object Pending and the message identifies a node-affinity or selector mismatch. The script does not change node labels to force success.

It first attempts to change the existing Pod’s nodeSelector and observes rejection of that field in this operation. It then removes only the synthetic Pod and creates a corrected declaration matching the node hostname; the application starts.

This controlled replacement suits the lab. For a real Deployment, change the managed template and respect rollout and availability plans.

A request larger than capacity

Another Pod requests one more CPU than the node’s observed total allocatable capacity. Memory and image remain small, but the scheduler reports Insufficient cpu and assigns no node. The process does not execute and the requested amount is not consumed.

The purpose is to test placement decisions rather than saturate the computer. Requests are commitments used in that decision; low instantaneous utilization does not remove insufficient requested capacity. Also compare placement restrictions and existing commitments.

Reducing a request should follow appropriate measurement and approval, avoiding a schedulable manifest based on an unrealistic resource budget.

Defaults become part of the object

In a second namespace, a LimitRange supplies a 50m CPU request and 100m limit to containers missing those values. Memory receives a 32Mi request and 64Mi limit. The script reads the stored Pod and confirms values added during admission.

Therefore, the YAML originally submitted may not show every resource that subsequently counts. The same LimitRange defines a 200m CPU maximum; a Pod with a 250m limit is rejected and is not created. Confirm effective defaults and limits before attributing a difference to the scheduler, application or manifest generator.

The stored object is essential evidence for interpreting the admission result.

Aggregate quota and budget release

ResourceQuota limits requests.cpu to 100m in the experiment’s namespace. The first Pod uses 50m of that budget; the second, created without explicit resources, receives defaults and brings usage to 100m. The third requests another 50m and receives exceeded quota.

It does not remain Pending: it does not exist. After removing the first Pod and observing 50m usage, the script creates the third again and it starts without raising quota. Accounting represents accepted requests within configured scope rather than measured CPU.

Releasing namespace budget also does not guarantee physical capacity or eligibility across nodes in another environment.

Plan delivery with the effective budget

In a fictional API migration, three steady replicas may fit the budget while one extra rollout replica does not. Use effective requests after defaulting, replica count during transition and other workloads consuming the same scope. Also identify who approves quota changes and how eligible capacity is confirmed.

The experiment neither measures production load nor executes a surge rollout; it supplies small observations supporting this reasoning. RUN handover should include constraints, failure signals, ownership and the planned response when admission or scheduling prevents progress.

A budget increase alone is insufficient evidence that the delivery plan will work.

Exercise files

Program, fixtures, instructions and historical records. Extract to a fresh directory and read README.en.md; prerequisites and setup differ between local generation and a disposable cluster.

Download kubernetes-access lab

SHA-256 (ZIP)

57a13cc5c9ffcafddb5a2f2e0ca0484bac95cb94c31e463f34f7d4c63e9bdd75

kubectl --context OWNED -n LAB get pod placement -o json
kubectl --context OWNED -n LAB describe pod placement
kubectl --context OWNED -n LAB get resourcequota,limitrange -o yaml
# Compare the rejection message, object existence and PodScheduled condition.
# Quota usage is not a measurement of instantaneous CPU utilization.
IN PRACTICE

Two Pods requesting 50m fill a 100m quota; the third is rejected before it exists even if the node has capacity.

Common pitfalls

Forbidden as RBAC in every case; Pending as CPU shortage; quota as physical reservation; directly changing immutable Pod fields.

Related topics: Resources and scheduling · Minimum access for support

Take this idea with you

Connect each failure to the correct phase: authorization and admission, placement, startup and functional acceptance.

Create account

References

Kubernetes® is a registered trademark of The Linux Foundation. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by The Linux Foundation. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.