Interview Prep/Kubernetes/Resources, autoscaling and scheduling

How do you force a pod onto GPU nodes only?

BeginnerScenarioResources, autoscaling and scheduling
Answer

Situation read → ML pods keep landing on regular nodes.

What I'd do →

  1. Label and taint GPU nodes, for example kubectl taint nodes gpu-1 nvidia.com/gpu=present:NoSchedule
  2. Request resources.limits.nvidia.com/gpu: 1
  3. Add a toleration and a nodeSelector or affinity
  4. Install the NVIDIA device plugin
  5. Check with kubectl describe node | grep nvidia

Why → Taints repel normal pods, tolerations plus selectors attract the intended ones.

Interview tip → Remember a toleration alone does not attract pods.

All Kubernetes questions Roadmap: Kubernetes core

More on Resources, autoscaling and scheduling