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.drainsection.pack:
drain:
drainPods: falseThe following table provides a brief description of the parameters.
Parameter Description Default drainPodsControls the node drain behavior during a cluster upgrade. truemeans nodes will always be drained.falsemeans nodes will never be drained.automeans nodes will only be drained for multi-node clusters, while single-node clusters will not drain nodes during an upgrade.autopodSelectorIf drainPodsis set totruefor either single-node or multi-node clusters, or set toautofor multi-node clusters, only pods matching the selectors will be drained. You can use positive or negative matches. For example,cluster.spectrocloud.com/task!=control-planmeans pods with thecluster.spectrocloud.com/task=control-planlabel are not drained, andapp=webmeans pods with the labelapp=webare drained.
Pods with any of the following labels are always protected from draining:cluster.spectrocloud.com/task=control-plan,cluster.spectrocloud.com/task=worker-plan,app=spectro,app=spectro-proxy,app=palette-webhookNone 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.drainPodsparameter totrue, and setpack.drain.disableEvictiontotrue. This will prevent the drain process from hanging indefinitely due toPodDisruptionBudgetconstraints, while the defaultpodSelectorwill 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.uriparameter, 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 logsto check on a node for which you skipped pod draining. Confirm that no messages that look likeEvicting pod <pod-name> as part of upgrade planare displayed. The absence of such messages means that the pods were not drained during the upgrade.