ClusterClasses are included in
vSphere 8.0 and have the ability to change the kubeadm config, including
timeoutForControlPlane. The option is to use Cluster Class directly in vSphere 8.0, instead of a TKC spec in order to avoid this issue.
ClusterClass is an upstream/OSS component of Cluster API core. It works with CAPV, as well as the other providers (AWS, Azure, etc). It's design was originally based on TKC's and implemented by engineers from VMware and other vendors through the CAPI/Kubernetes standard design/implementation processes.
VMware has rebuilt TKGs/TKC on top of the ClusterClass model in vSphere 8.0. In future versions of vSphere/TKGs we plan to migrate customers to using ClusterClasses directly and deprecate the use of TKC specs.
Note: Without the mentioned ClusterClass changes, the
default timeoutForControlPlane in vSphere 8.0 is still 4m.
----------------------------------------------------------------------------------------
More details on the procedure to use ClusterClass in vSphere 8.0:
The
default ClusterClass used by TKCs is currently
immutable in a live environment. The reason is each vSphere release that follows may update the default ClusterClass, in which case changes would be overwritten. But the team has been having discussions on how to support versioning such that customers can make modifications to the default CC.
A
custom ClusterClass is mutable, as VC releases will not modify it, so it is possible to use a CC to change the timeout.
Steps would be first clone the default CC:
# kubectl get -o yaml clusterclass tanzukubernetescluster > custom-cc.yaml
Edit custom-cc.yaml, changing the name ("tanzukubernetescluster" to "custom-cc") and adding the following 3 lines to change timeout to 25 minutes:
- name: tkrConfiguration
enabledIf: "{{ if .TKR_DATA }}true{{end}}"
definitions:
- selector:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlaneTemplate
matchResources:
controlPlane: true
jsonPatches:
- op: add
path: /spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/timeoutForControlPlane
value: 25m # default is 4m
Create the new CC:
# kubectl apply -f custom-cc.yaml
Creating clusters with the custom CC would use a
cluster.x-k8s.io/Cluster spec rather than
run.tanzu.vmware.com/TanzuKubernetesCluster. The spec is a different structure, but values are the same what you'd see in a TKC spec (TKr version, # of control plane/worker nodes, storage class, vm class, etc.)
And the default timeoutForControlPlane value for all CP/worker nodes created by this CC will be 25m.
Workaround:
Create an extra SE before creating a TKC and that should take care of it.