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

Scheduling involves finding the pods that need to be run and running (scheduling) them on nodes in a cluster.

Problem

Often containers have dependencies between them and need to be collocated on the same node to reduce

the network latency between them. The pod abstraction can encapsulate multiple containers, which solves

the problem of collocating containers with dependencies between them. The pattern can be extended

further to dependencies between pods that need to be running on the same or a different machine (node).

Solution

In a recent publication, Design Patterns for Container-based Distributed Systems, by Brendan Burns and

David Oppenheimer (https://www.usenix.org/node/196347), three types of container design patterns are

discussed:

1. Single Container Management Patterns

2. Single Node, Multi-Container Application Patterns

3. Multi-Node Application Patterns

All of these design patterns require pods to be scheduled on specific nodes in a cluster. Kubernetes

provides various options for scheduling pods on specific nodes within a cluster. The sequence used to

schedule a pod on a node is shown in Figure 9-1.

Find a pod that

needs to be run

Find a suitable node

to run the pod on

Schedule the pod on

the node

Figure 9-1. Sequence used in scheduling a pod

© Deepak Vohra 2017

D. Vohra, Kubernetes Management Design Patterns, DOI 10.1007/978-1-4842-2598-1_9

199

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

Saved successfully!

Ooh no, something went wrong!