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

Articles are written in English. The Thai translation button opens Google Translate; code and commands stay in their original form.

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

Check which system and tools you are using. Replace example objects, namespaces, images, file paths and hosts with approved values. Remove sensitive information before sharing output. Follow the application owner’s process for changes.

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

What the results mean

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

Fix the cause and check again

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