Prevent workload clusters from being recreated after changing the Supervisor Cluster’s content library.
search cancel

Prevent workload clusters from being recreated after changing the Supervisor Cluster’s content library.

book

Article ID: 420227

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

After changing the supervisor cluster's content library, it will trigger the existing workload clusters to re-create. 

In some scenarios, we don't want it happens. 

"In addition, changing the Content Library hosting the TKR images can trigger rolling updates of TKG clusters. Adding new images, either through a subscription or manually, does not trigger a rolling update of TKG clusters."

"For example, consider a scenario where you are using a Subscribed Content Library which automatically uses the system-defined OVA names. Then you switch to a Local Content Library and populate it with the same OVAs but give them different names. This will trigger a rolling update of all TKG clusters because the replacement Content Library has the same OVAs but with user-defined different names."

https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere-supervisor/8-0/using-tkg-service-with-vsphere-supervisor/updating-tkg-service-clusters/understanding-the-rolling-update-model-for-tkg-service-clusters.html

Environment

Supervisor Cluster

Cause

kubectl patch cluster <CLUSTER_NAME> -n <NAMESPACE> --type merge -p '{"spec":{"paused": false}}'

Resolution

1. Patch the target workload to set the paused as true

kubectl patch cluster <CLUSTER_NAME> -n <NAMESPACE> --type merge -p '{"spec":{"paused": true}}'

 

2. Check if it is changed

kubectl get cluster <CLUSTER_NAME> -n <NAMESPACE> -o jsonpath='{.spec.paused}{"\n"}'

 

3. NOTE: Change it back to false will trigger the recreating

kubectl patch cluster <CLUSTER_NAME> -n <NAMESPACE> --type merge -p '{"spec":{"paused": false}}'