k8s start pod at specific node
specify nodeSelector
or nodeName
in Pod
or VirtualMachineInstance
manifest
these selectors are in the spec
field
1 | kubectl run <pod name> --image=<image name> -it --rm --overrides='{"spec":{"nodeName": "<node name>"}}' -- /bin/sh |
to label a node, run:
1 | kubectl label node <node_name> <key>=<value> |