Tips:How to ensure your pod ends up on a specific node
Jump to navigation
Jump to search
Specifying node placement in the pod
Node affinity is specified with a node selector as follows. Here, the system will try to place the pod on the node with hostname "vecna", i.e. the DGX2.
apiVersion: v1
kind: Pod
metadata:
name: ...
spec:
nodeSelector:
kubernetes.io/hostname: vecna
...
There is a ton of different options and other possibilities, see
Assigning pods to nodes (Kubernetes tutorial)
Node labels pre-defined in the cluster which can be used to specify pod affinity and selectors
TODO