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-57. Setting all label values to nginx

Delete and create the pod again. The pod is scheduled on the node with kubernetes.

io/image-name label key set to hello-world, as shown in Figure 9-58. Again the scheduler

does not guarantee pod allocation to a node with the specified labels when the node affinity is

preferredDuringSchedulingIgnoredDuringExecution. With the same settings, the pod could just as well

have been allocated to a different node.

Figure 9-58. Scheduling a pod with node affinity preferredDuringSchedulingIgnoredDuringExecution

does not guarantee pod schedulement on a particular node

As another example, specify all the kubernetes.io/image-name key values to those not used in node

labels, as shown in Figure 9-59.

234

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

Saved successfully!

Ooh no, something went wrong!