Kubernetes

How to schedule a pod on a node called "node1"?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

k run some-pod --image=redix -o yaml --dry-run=client > pod.yaml

vi pod.yaml and add:

spec:
  nodeName: node1

k apply -f pod.yaml

Note: if you don't have a node1 in your cluster the Pod will be stuck on "Pending" state.