Skip Node Draining
When you apply a new cluster profile to your cluster with changes that require node reboot or repave, the cluster may drain each node as it updates the pods on that node. This is helpful in multi-node clusters as it allows you to avoid or minimize application downtime. For more information what changes will cause reboot or repave, refer to Edge Cluster Upgrade Behavior.
However, the benefits of draining a node in a single-node cluster are minimal because there are no other nodes to schedule the workloads onto. In addition, if system-critical workloads are drained, the cluster may get stuck in an unmanageable state.
By default, Palette will only drain nodes in multi-node Edge clusters. You can configure draining behavior via the OS layer of the cluster profile. These configurations will apply to both appliance mode and agent mode deployments.
Prerequisites
-
A Palette account. If you do not have one, you can register an account on Palette.
-
An Edge-type cluster profile.
-
An host registered with your Palette account or an existing Edge-type cluster. For more information, refer to Edge Host Registration and Deployment.
-
Palette version 4.5.15 or higher, with Palette agent version 4.5.11 or higher.
Skip Node Draining During Upgrades or Repaves
-
Log in to Palette.
-
From the left Main Menu, click Profiles.
-
Select the cluster profile you use to provision the clusters for which you want to skip node draining during upgrades or repaves.
-
Select the BYOS Edge OS layer of your profile, and configure the
pack.drain
section.pack:
drain:
drainPods: falseThe following table provides a brief description of the parameters.
Parameter Description Default drainPods
Controls the node drain behavior during a cluster upgrade. true
means nodes will always be drained.false
means nodes will never be drained.auto
means nodes will only be drained for multi-node clusters, while single-node clusters will not drain nodes during an upgrade.auto
podSelector
If drainPods
is set totrue
for either single-node or multi-node clusters, or set toauto
for multi-node clusters, only pods matching the selectors will be drained. You can use positive or negative matches. For example,upgrade.cattle.io/plan!=control-plan
means pods with theupgrade.cattle.io/plan=control-plan
label are not drained, andapp=web
means pods with the labelapp=web
are drained.
Pods with any of the following labels are always protected from draining:upgrade.cattle.io/plan=control-plan
,upgrade.cattle.io/plan=worker-plan
,app=spectro
,app=spectro-proxy
,app=palette-webhook
None warningDisabling node draining means normal workloads and the upgrade process happen in parallel. This will increase memory usage, and may cause your node to become unresponsive if your host is memory-constrained.
In such cases, you may set the
pack.drain.drainPods
parameter totrue
, and setpack.drain.disableEviction
totrue
. This will prevent the drain process from hanging indefinitely due toPodDisruptionBudget
constraints, while the defaultpodSelector
will protect most critical system pods. -
Create a new cluster with the updated cluster profile, or update an existing cluster to use the new cluster profile. For more information, refer to Create a Cluster or Update a Cluster.
For existing clusters, when you update the profile without changing the
system.uri
parameter, these changes alone will take effect and will not trigger any reboot or repave. The next time you make a change to the cluster profile that will trigger a repave or reboot, the new draining settings will apply. For more information about cluster behavior during upgrades, refer to Edge Cluster Upgrade Behavior.
Validate
-
Update the cluster to use a new version of a cluster profile. Ensure that your change will trigger a reboot or repave. For more information, refer to Update a Cluster and Edge Cluster Upgrade Behavior.
-
After the upgrade is completed, use
kubectl logs
to check on a node for which you skipped pod draining. Confirm that no messages that look likeEvicting pod <pod-name> as part of upgrade plan
are displayed. The absence of such messages means that the pods were not drained during the upgrade.