19.06.2021 Views

148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 9 ■ Scheduling Pods on Nodes

Overview

Kubernetes Scheduler is a Kubernetes component or process that runs alongside the other components

such as API Server. The purpose of the Scheduler is to monitor the API for pods that need to be scheduled,

find a suitable node to schedule a pod, and schedule the pod, one pod at a time. This chapter looks at the

following topics.

Defining a scheduling policy

Setting the environment

Using the default scheduler

Scheduling pods without a node selector

Setting node labels

Scheduling pods with node selector

Setting node affinity

Setting requiredDuringSchedulingIgnoredDuringExecution

Setting preferredDuringSchedulingIgnoredDuringExecution

Defining a Scheduling Policy

Scheduling is determined by a scheduling policy, involving predicates and priority functions. Scheduling

involves the following process, starting with all nodes being viable to schedule a pod:

1. Filter out nodes using filtering policy predicates. The objective of filtering out

nodes is to exclude those nodes that do not meet certain requirements of a pod.

2. Nodes are ranked using priority functions.

3. The pod is scheduled onto the node with the highest priority. If multiple nodes

have equal priority, one of the nodes is chosen at random.

Some of the salient predicates that implement filtering policy are discussed in Table 9-1.

200

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!