Contents

Kubernetes Scheduler Bind nodeName

How the scheduler works?

Scheduler
If the scheduler is running, the scheduler is binding a new POD that is undefined nodeName to the Node.

POD YAML

pod-definition.yml

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    name: nginx
spec:
  containers:
    - name: nginx
      image: nginx
      ports:
        - containerPort: 8080
# nodeName: node02 # -> We don't need to set this value as an default.

Create a POD

1
kubectl create -f pod-definition.yml

Scheduler Process