liveBook · Manning

Workload placement

As explained in Google Anthos in Action

Workload placement is the scheduling of application workloads onto computing nodes according to resource, location, and policy requirements.

Workload placement schedules Kubernetes workloads onto nodes that satisfy resource, location, and policy requirements. Labels attract eligible workloads; taints repel workloads unless they declare a matching toleration. section 3.4.1

Configure placement by matching node metadata with workload scheduling rules:

  • Label fast-disk nodes with disk=fast and select them with nodeSelector. section 3.4.1
  • Taint GPU-only nodes with workload=gpu:NoSchedule, label them for selection, and add a matching toleration to GPU workloads. section 3.4.1

Three-zone GKE placement

In a cluster spanning three GCP zones, place an NGINX Pod on a fast-disk node with nodeSelector disk: fast, or on a GPU node with nodeSelector workload: gpu and a workload=gpu NoSchedule toleration. Verify placement from kubectl output showing the assigned node. section 3.4.1

Table 3.11 Placement of workloads (view table figure)

Zone

Desired workloads

Label/taint

Node name

us-east4-a

Any workloadFast disk access

disk=fast

gke-cls1-pool1-1d704097-4361

us-east4-b

Only workloads that require a GPU

workload=gpu

gke-cls1-pool1-52bcec35-tf0q

us-east4-c

Any workload

 

gke-cls1-pool1-e327d1de-6ts3

Use the placement table to compare zone requirements, node labels or taints, and node names. section 3.4.1

How Google Anthos in Action covers it

How deep it goes
Works through labels, taints, tolerations, manifests, commands, and kubectl verification, stopping short of broader scheduler internals.
Examples
Uses a three-zone GKE cluster, fast-disk and GPU nodes, NGINX manifests, kubectl commands, and assigned-node output.
What it assumes
Assumes an initially deployed GKE cluster and teaches the labels-versus-taints distinction through configuration.
What you can do after
Operate/configure node labels, taints, selectors, and tolerations to demonstrate successful workload placement.
How it connects
Connects node labels, taints, tolerations, nodeSelector, Pods, deployments, and Kubernetes scheduling.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Google Anthos in Action. The section links point to the parts of the book it draws on.