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

Figure 9-61. Setting nodeSelector in addiiton to node affinity

preferredDuringSchedulingIgnoredDuringExecution

Delete and create the with-labels pod again. The pod is scheduled on the node with kubernetes.io/

image-name: nginx label because the nodeSelector expression is kubernetes.io/image-name: nginx as

shown in Figure 9-62.

Figure 9-62. The pod is scheduled on the node with label matching the nodeSelector expression

Summary

In this chapter we first discussed the default scheduling policy used by Kubernetes. Then we used the default

scheduler and also the node selector to schedule pods on nodes. We also discussed scheduling pods using

node affinity. In the next chapter we shall discuss configuring compute resources.

236

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

Saved successfully!

Ooh no, something went wrong!