TKG 2 with vSphere with Tanzu "Nodedraintimeout" in TKC v1alpha3 vCenter Server 8.0 won't take effect
search cancel

TKG 2 with vSphere with Tanzu "Nodedraintimeout" in TKC v1alpha3 vCenter Server 8.0 won't take effect

book

Article ID: 313778

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
Specify nodedraintimeout can still lead to successful cluster creation, but won’t take effect on the nodes.

Cause

TKR resolver webhook excluded nodedraintimeout contract in CAPI Cluster because of the mismatch in its CAPI provider version.

Resolution

Currently there is no resolution.

Workaround:
To workaround this issue, please follow the below steps:
  1. Login as root user to supervisor cluster.
  2. To  add node draintimeout for worker nodes:

# kubectl edit md <machine-deployment> -n <namespace>

  1. Add nodeDrainTimeout value to

machineDeployment.spec.template.spec.nodeDrainTimeout

  1. For control plane nodes, you need to get all control plane machines under the kcp.

root@423c492ddde9adef46a330a37887bb2a [ ~ ]# kubectl get machines -n gctest -l cluster.x-k8s.io/control-plane="",cluster.x-k8s.io/cluster-name=tkc-minimal
NAME                      CLUSTER       NODENAME   PROVIDERID                                       PHASE         AGE   VERSION
tkc-minimal-vcj9l-bm97g   tkc-minimal              vsphere://423cffbf-472c-59d4-fbaa-e4d1aaa58023   Provisioned   10h   v1.22.9+vmware.1

  1. Also edit KCP, and add node drain timeout value to

kcp.spec.machineTemplate.nodeDrainTimeout