In this section, we will take a look at kube-scheduler.
- The kube-scheduler is only responsible for deciding which pod goes on which node. It doesn't actually place the pod on the nodes, that's the job of the
kubelet
.
kube-scheduler selects a node for the pod in a 2-step operation:
- Filtering
- Scoring
- Download the kubescheduler binary from the kubernetes release pages
kube-scheduler. For example: To download kube-scheduler v1.13.0, Run the below command.
$ wget https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/amd64/kube-scheduler
- Extract it
- Run it as a service
- If you set it up with kubeadm tool, kubeadm tool will deploy the kube-scheduler as pod in kube-system namespace on master node.
$ kubectl get pods -n kube-system
- You can see the options for kube-scheduler in pod definition file that is located at
/etc/kubernetes/manifests/kube-scheduler.yaml
$ cat /etc/kubernetes/manifests/kube-scheduler.yaml
- You can also see the running process and effective options by listing the process on master node and searching for kube-apiserver.
$ ps -aux | grep kube-scheduler