Difference between revisions of "Tips:How to ensure your pod ends up on a specific node"

From Collective Computational Unit
Jump to navigation Jump to search
(Created page with "== 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 "vecna", i.e. th...")
(No difference)

Revision as of 12:23, 4 July 2020

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 "vecna", i.e. the DGX2.

apiVersion: batch/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