Some Deckhouse Platform components have tolerations that allow their pods to be assigned even to unavailable nodes, including cordoned nodes.
Behavior of deckhouse pods
By default, deckhouse pods use the broad operator: Exists toleration.
A standby replica can therefore be assigned to an unavailable or cordoned node and remain in the Pending state (or Terminating during a Deckhouse Platform version update).
The replica with the leader=true label on an available node continues to run Deckhouse. Check the leader with:
d8 k -n d8-system get pods -l app=deckhouse,leader=true -o wide
For details, see the FAQ.
Behavior of pods of other Deckhouse Platform components and modules
Pods of other components and modules can also be scheduled onto unavailable nodes.
Placement rules depend on each pod’s tolerations and controller type.
The d8-* namespace or the system-cluster-critical priority alone does not allow placement on an unavailable node.
A toleration removes the corresponding restriction, but nodeSelector, affinity, and resource requirements still apply.
Distinguish the following node states:
- Cordon (
SchedulingDisabled) prevents ordinary scheduling of new pods, but does not stop kubelet or existing pods. NotReadymeans that the node is not ready to run workloads.- Loss of communication with the node results in the
node.kubernetes.io/unreachabletaint. The API server may not know whether containers on the node are still running.
A pod with matching tolerations can be assigned to such a node. If kubelet is unavailable, it cannot start a new pod, which can remain Pending.
An existing pod can remain in the API even if the node is powered off.
DaemonSet node components
CNI agents, such as the agent of the cni-cilium module and flannel of the cni-flannel module, as well as CSI driver node components, are deployed as DaemonSets.
Their pods are needed on every eligible node. In particular, a network agent must be able to start before the node network is ready; otherwise, the node cannot become Ready.
Kubernetes automatically adds tolerations for the following taints to DaemonSet pods:
| Taint key | Effect | Behavior |
|---|---|---|
node.kubernetes.io/unschedulable |
NoSchedule |
Allows placement after cordon |
node.kubernetes.io/not-ready, node.kubernetes.io/unreachable |
NoExecute |
Keeps the pod on a node that is not ready or has lost communication, without a time limit |
node.kubernetes.io/memory-pressure, node.kubernetes.io/disk-pressure, node.kubernetes.io/pid-pressure |
NoSchedule |
Allows placement under memory, disk space, or process ID pressure |
node.kubernetes.io/network-unavailable |
NoSchedule |
Allows placement when the network is unavailable; added only to pods with hostNetwork: true |
These tolerations do not cover arbitrary custom taints. For example, a NoExecute toleration does not match a taint with the same key and the NoSchedule effect.
Placement depends on the complete set of node taints and pod tolerations. For details, see Kubernetes DaemonSet tolerations.
The d8 k drain <NODE_NAME> --ignore-daemonsets command leaves DaemonSet pods on the node.
The --ignore-daemonsets flag allows drain to continue without deleting these pods. After manual deletion, the controller can create a pod on the same node again.
In addition to tolerations added by Kubernetes, node components can receive tolerations from Deckhouse Platform.
For example, CNI agents and CSI driver node components tolerate taints with the dedicated key and keys listed in modules.placement.customTolerationKeys.
This allows them to provide networking and storage access on nodes dedicated to user workloads.
Controllers and image storage on master nodes
Some controllers, such as the cloud providers’ cloud-controller-manager and the cloud-provider-vcd module’s capcd-controller-manager, use the broad operator: Exists toleration without a key or effect.
It matches all taints. These pods can be assigned to nodes that are not ready or are cordoned, and are not evicted because of NoExecute taints.
For bashible-apiserver, node-controller, machine-controller-manager, capi-controller-manager, registry-controller, registry-storage, and registry-packages-proxy, behavior depends on the number of master nodes:
- With one master node, the toleration for
node.kubernetes.io/unschedulable:NoScheduleallows placement after cordon. Thenode.kubernetes.io/unreachabletaint is tolerated without a time limit because no other master node is available for relocation. - With several master nodes, no cordon toleration is added to these pods.
The
node-managercontrollers,registry-controller, andregistry-packages-proxytoleratenode.kubernetes.io/unreachable:NoExecutefor60seconds, after which Kubernetes can begin eviction. Theregistry-storagepod remains on a node that has lost communication without this time limit because its storage is tied to the node.
A toleration with a time limit does not guarantee that a pod will be deleted and started on another node exactly when that time expires.
If kubelet is unavailable, deletion can be delayed and the pod can remain Terminating.
Tolerations do not protect Deployment and StatefulSet pods from eviction by drain.
A new pod can nevertheless be assigned to a cordoned node again if its tolerations allow such placement.
Static pods
Kubernetes control plane components, such as kube-apiserver, kube-controller-manager, kube-scheduler, and etcd, are started by kubelet as static pods.
They do not go through the scheduler, so cordon does not prevent them from starting, and no tolerations are needed for this purpose.
The drain command does not remove them either. These components require a working kubelet on the node itself.