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.
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.