Skip to main content
Calico Cloud documentation

Mark a load balancer node for maintenance

This guide shows you how to mark a node as being under maintenance.

When a node is marked for maintenance, Calico Cloud will avoid load balancing new service traffic to pods on that node until the annotation is removed. Existing connections will continue to work until they are finished.

Limitations​

The following limitations apply to load balancer maintenance features:

  • Load balancer node maintenance features are only supported by the eBPF dataplane.

  • Upstream routers might still send traffic to marked nodes, if routing is not configured to exclude the marked nodes. In this case, the node under maintenance will load balance traffic to a backend on another node. Maglev Load Balancing can be used to mitigate the negative effects of upstream routing adjustments.

Prerequisites​

Exclude backends on a node from load balancer backend selection​

To exclude a node's backends from load balancer backend selection, annotate the K8s node resource with the following annotation:

lb.projectcalico.org/maintenance: "exclude-local-backends"

or from the terminal:

kubectl annotate node <name> 'lb.projectcalico.org/maintenance=exclude-local-backends'

To add the backends back into the selection pool, either remove the annotation, or set the value to "none".

Additional notes​

Failsafes​

It is not possible to remove all backends of a service from backend selection via the maintenance annotation. In the event that the maintenance annotation would lead to an empty set of backends for a given service, no backends will be excluded at all for that service.

Additional resources​