NodeSelector: easy way to select nodes where to run podsΒΆ

To select a particular node where to install a pod we can use nodeSelector directive in the definition of the deployment or pod. Here is an example:

kind: Deployment
...
spec:
   ...
   template:
   ...
   spec:
   containers:
       ...
   nodeSelector:
       kubernetes.io/hostname: pa1-r1-s15