Influencing Kubernetes scheduling
This is meant as a short introduction to the various options that influence scheduling when using the Piraeus chart. To influence pod placement, we use the Kubernetes concepts of tolerations and affinity.
High Availability by distributing pods
If you are running multiple replicas to achieve High Availability, you want pods to be distributed across as many nodes as possible. This ensures that failure of a single node does not interrupt a critical set of pods.
The way to achieve scheduling on different nodes is by using
This affinity setting ensures that only one pod with label
app: etcd will be scheduled per node.
Piraeus will use such
affinity settings by default for:
etcdchange by setting
operatorchange by setting
Piraeus controllerchange by setting
CSI controllerchange by setting
Place pods on master nodes
To allow pods to be placed on master nodes, you need add tolerations:
- key: node-role.kubernetes.io/control-plane # New value since Kubernetes 1.24
- key: node-role.kubernetes.io/master
This toleration allows pods to be scheduled on master nodes.
Note that using tolerations this way only allows scheduling on master nodes, but does not force it. The pod can still
end up on a worker node. To force scheduling on master nodes, use affinity settings to set the
By default, piraeus will set this toleration for the
etcd pods. Tolerations can be set on:
Piraeus controllerby setting
Piraeus satellitesby setting
CSI controllerby setting
CSI nodesby setting