Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

ปุ่มแปลไทยจะเปิดบทความผ่าน Google Translate เพื่อแปลอัตโนมัติ โดยคงโค้ดและคำสั่งไว้ตามต้นฉบับ

Kubernetes / Deployments, Scheduling & Batch Workloads

Find an affinity rule that makes a workload unschedulable

A valid-looking workload can require labels or topology relationships no available node satisfies. Inspect the actual placement rules.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Kubernetes · kubectl with supported client/server versions and delegated RBAC. Examples use namespace app unless noted. Check context, namespace, APIs and provider support first.

Start with this check

Confirm the environment and replace sample objects, namespaces, images, paths and hosts with approved targets. Share only relevant, sanitized output. Follow the workload owner’s process for changes.

kubectl -n app get deployment web -o jsonpath='{.spec.template.spec.nodeSelector}{" "}{.spec.template.spec.affinity}'

Read the result

The output shows selector and affinity intent. Required and preferred rules have different scheduling effects and must be compared with current node labels.

Resolve and verify

Match the scheduler's reason with the intended fault-domain and capacity design. Correct the verified rule or node-label drift and observe a new scheduling attempt.

Before changing production

Do not remove all placement constraints or invent labels that misrepresent hardware or isolation boundaries.

Share this article

Back to all articles