VKS Cluster Worker Nodes: Unexpected Creation and Deletion during Kasten backup
search cancel

VKS Cluster Worker Nodes: Unexpected Creation and Deletion during Kasten backup

book

Article ID: 434726

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service VMware vSphere ESXi

Issue/Introduction

  • Cluster-autoscaler logs indicate that a scale-up event was triggered by a VolumeBinding predicate failure, specifically the error "PVC is not bound."
stderr F IMMDD hh:mm:ss.nnnnnn 1 binder.go:764] "PVC is not bound" logger="PreFilter.VolumeBinding" PVC="kasten-ns/kanister-pvc-bbbb"
stderr F IMMDD hh:mm:ss.nnnnnn 1 klogx.go:87] failed to find place for kasten-ns/copy-vol-data-####: can't schedule pod kasten-ns/copy-vol-data-xxxx: predicate "VolumeBinding" didn't pass (predicateReasons=[pod has unbound immediate PersistentVolumeClaims]; unexpectedError=PreFilter failed)
  • An unexpected worker node recreation happened with "Scaled MachineSet" message in the capi-controller-manager logs like below:
1 recorder.go:104] "Scaled MachineSet <my-namespace>/<my-machineset>: 3 -> 4" logger="events" type="Normal" object={"kind":"MachineDeployment","namespace":"<my-namespace>","name":"<my-machinedeployment>","uid":"---","apiVersion":"cluster.x-k8s.io/v1beta1","resourceVersion":"#########"} reason="SuccessfulScale"
:
1 recorder.go:104] "Scaled MachineSet <my-namespace>/<my-mschineset>: 4 -> 3" logger="events" type="Normal" object={"kind":"MachineDeployment","namespace":"<my-namespace>","name":"<my-machinedeployment>","uid":"########-####-####-####-############","apiVersion":"cluster.x-k8s.io/v1beta1","resourceVersion":"#########"} reason="SuccessfulScale"

Environment

  • VMware vSphere Kubernetes Service
  • Veeam Kasten for Kubernetes Installed and Configured
  • Cluster AutoScaler Configured
  • Dell PowerStore with the CSI Controller configured 

 

Cause

When the Kasten backup process initiated, it attempted to deploy two pods where each requiring a specific Persistent Volume Claim (ex. kasten-ns/kanister-pvc-xxxx and kasten-ns/kanister-pvc-yyyy). These pods failed to schedule because their respective PVCs were not yet bound. Consequently, the autoscaler initiated a node scale-up; however, by the time the new node was provisioned, the PVCs had successfully bound. This rendered the additional node unnecessary, resulting in its immediate deletion.

This behavior can occur when the backend storage provider exhibits high latency during volume provisioning or binding operations.

Resolution

For a permanent fix, please work with the storage provider and improve the latency of the storage operations.

As a workaround,  a scale-up delay must be implemented in the Cluster Autoscaler configuration to allow for high storage latency.
Please follow below steps to adjust the scale-up delay.

1. Add the new-pod-scale-up-delay argument to the Cluster Autoscaler configuration.
If using a values.yaml for deployment, the configuration should be updated as follows:

$ vi values.yaml 
arguments:
  ignoreDaemonsetsUtilization: true  
  maxNodeProvisionTime: 15m  
  maxNodesTotal: 0  
  metricsPort: 8085  
  scaleDownDelayAfterAdd: 10m  
  scaleDownDelayAfterDelete: 10s  
  scaleDownDelayAfterFailure: 3m  
  scaleDownUnneededTime: 10m
extraArguments:               ### +
  - "new-pod-scale-up-delay=600s" ### +<<<--- Add param to the config.
clusterConfig:  
  clusterName: "tkc"  
  clusterNamespace: "cluster"
paused: false


2. Update the Package using the modified configuration.

$ tanzu package installed update cluster-autoscaler-pkgi -n tkg-system --package cluster-autoscaler.tanzu.vmware.com --values-file values.yaml

The 600s value (10 minutes) is a recommended starting point and should be adjusted based on the observed maximum latency of the storage provider.

Additional Information

For more information on Autoscaler, please check the formal documentation from Broadcom. 
Autoscaling TKG Service Clusters

Related upstream Autoscaler issues - 
    Issue 5801: Reports unexpected scale-ups due to PVC timing.
    Issue 3131: Explains the mechanism of this race condition.
    Resolution - How can I modify Cluster Autoscaler reaction time?