Fake GPU scheduling on kind
CPU · your Maccli150 minrequiredGoal · A local kind cluster where some nodes advertise a fake extended resource and are tainted, and you prove the scheduler places and rejects pods exactly as it would with real GPUs.
- 1Install kind and kubectl; create a cluster with one control-plane and three worker nodes from a kind config file.
- 2Label two workers accelerator=fake-gpu and taint them nvidia.com/gpu=present:NoSchedule; leave the third as a CPU node.
- 3Advertise a fake extended resource by patching node status via the API server proxy (kubectl proxy, then PATCH /api/v1/nodes/NAME/status with capacity example.com/gpu 4).
- 4Write a Deployment that requests example.com/gpu 2 with the matching toleration and nodeSelector; scale to 4 replicas and observe where they land.
- 5Scale to 5 replicas and show with kubectl describe pod that the fifth is Pending with an insufficient example.com/gpu event.
- 6Deploy a plain CPU pod without the toleration and confirm it never lands on a tainted node.
- 7Add a podAntiAffinity or topologySpreadConstraint and show replicas spread across both fake-GPU nodes.
- Deliverable
- kind-config.yaml, the manifests, and a transcript of kubectl get pods -o wide plus the Pending event.
- Check
- Exactly four replicas are Running (two per fake-GPU node); the fifth is Pending with an insufficient resource message; the CPU pod runs only on the untainted node.