How to configure a pod to be created on a specific k8s node
DX 2x onpremise
Option 1:
a) label the node:
kubectl label nodes <node-name> master=true
example:
kubectl label nodes oi-rhel87-ose1 master=true
b) add label to the deployment under "spec" section as below:
nodeSelector:
master: "true"
Option 2: hardcode the node in the deployment : use below line under the spec section:
nodeName: give the node name
Example from: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
spec: nodeName: kube-01
The above Pod will only run on the node kube-01