Running Kubernetes Pods without the Kubernetes Scheduler
I am on my continuous preparation for Kubernetes and during this process I find interesting capabilities I did not know about. (See another article from the same series)
One of them is the capability to run a Pod on a node without the running Scheduler (when the Scheduler is running it will apply it’s algorithms to put the Pod on the optimal Node for it.)
This is possible by using the nodeSelector
field.
The example bellow shows how this can be used.
By using this technique the Pod will run on the Node named cluster2-master1
without the cluster Scheduler.
kind: Pod
metadata:
labels:
name: manual-schedule
spec:
nodeName: cluster2-master1 # use the node name here
containers:
- image: httpd:2.4-alpine
imagePullPolicy: IfNotPresent
name: manual-schedule
Sign up now so you don’t miss the next issue.
In the meantime, tell your friends!