In VKS cluster, all control plane nodes are recreated, while the worker nodes remains unaffected.
# kubectl get nodes
NAME STATUS ROLES AGE VERSION
<CLUSTER NAME>-tkg-cluster-nodepool-nn8w-swsd9-txvfc-75h6v Ready <none> 330d v1.29.4+vmware.3-fips.1
<CLUSTER NAME>-zcptp-5vm79 Ready control-plane 10m v1.29.4+vmware.3-fips.1
VMware vSphere Kubernetes Service - vCenter 8.0 U3 or later
This is the automatic certificate renewal feature for VKS Cluster implemented in vSphere Supervisor 8.0 U3. The control plane node is rolled out for the certificate renewal.
# kubectl vsphere login --insecure-skip-tls-verify --server <Supervisor Endpoint># kubectl config use-context <Supervisor context># kubectl logs -n svc-tkg-domain-<your cluster domain id> deployments/capi-kubeadm-control-plane-controller-manager1 controller.go:473] "Rolling out Control Plane machines: Machine <Cluster Name>-#####-7v5xh needs rollout: certificates will expire soon, rolloutBefore expired,Machine <Cluster Name>-#####-rv2x4 needs rollout: certificates will expire soon, rolloutBefore expired,Machine <Cluster Name>-#####-mdmz9 needs rollout: certificates will expire soon, rolloutBefore expired" controller="kubeadmcontrolplane" controllerGroup="controlplane.cluster.x-k8s.io" controllerKind="KubeadmControlPlane" KubeadmControlPlane="<Namespace>/<Cluster Name>-#####" namespace="<Namespace>" name="<Cluster Name>-#####" reconcileID="a928ff0b-####-####-####-9ce4a5438779" Cluster="<Namespace>/<Cluster Name>" machinesNeedingRollout=["<Cluster Name>-#####-7v5xh","<Cluster Name>-#####-rv2x4","<Cluster Name>-#####-mdmz9"]
To change behavior of automatic certificate renewal, the cluster object can be edited as below:
kubectl vsphere login --insecure-skip-tls-verify --server <Supervisor Endpoint>
kubectl config use-context <Supervisor context>
kubectl edit -n <Cluster namespace> cluster <Cluster name>
// under .spec.topology.variables
...
- name: controlPlaneCertificateRotation
value:
activate: true # <--- Change to "false" if you want to disable it
daysBefore: 90 # <--- Control the date of the auto renewal
A similar rollout occurs in a Tanzu Kubernetes Grid v2.5.x environment.
Kubernetes Control Plane nodes get recreated unexpectedly
Japanese KB: コントロールプレーンの証明書の自動更新の動作を変更する方法