Symptoms:
E1220 17:33:48.452774 1 controller.go:257] controller-runtime/controller "msg"="Reconciler error" "error"="unexpected error while probing vcenter for infrastructure.cluster.x-k8s.io/v1alpha3, Kind=VSphereCluster uploader-prod/uploader-autoscale: Post \"https://VCENTER-FQDN/sdk\": host \"VCENTER-FQDN:443\" thumbprint does not match \"<THUMBPRINT>\"" "controller"="vspherecluster" "name"="uploader-autoscale" "namespace"="uploader-prod"
2025-04-02 22:29:09.930 [WARNING][85] felix/ipip_mgr.go 111: Failed to add IPIP tunnel device error=exit status 1
2025-04-02 22:29:09.930 [WARNING][85] felix/ipip_mgr.go 88: Failed configure IPIP tunnel device, retrying... error=exit status
This error occurs due to the vCenter certificate thumbprint changing and not being updated on the TKG management cluster objects and/or in the workload cluster object's metadata.
In the Management Cluster context, update the {clustername}-vsphere-cpi-addon secret in the management cluster context
-Get the actual secret name for your workload cluster kubectl get secret -A | grep cpi-addon
- Save the data values information of the secret into a yaml file. Make sure that the secret name here is correct and the same as the actual secret name as retrieved in the above command.
kubectl get secret WC-vsphere-cpi-addon -o jsonpath={.data.values\\.yaml} | base64 -d > WC-vsphere-cpi-addon.yml
- Open the yaml file and confirm that they match
-Confirm that the labels are there and match kubectl get secret WC-vsphere-cpi-addon | grep label
( this should look something like tkg.tanzu.vmware.com/cluster-name=WC and tkg.tanzu.vmware.com/addon-name=vsphere-cpi)
Verify in the Workload Cluster
-The output of this command should show the thumbprint info kubectl -n tkg-system get secret vsphere-cpi-data-values -o jsonpath={.data.values\\.yaml} | base64 -d | grep -i thumbprint
-The output of this command should show the thumbprint info as well. Compare these will doublecheck we are seeing the correct thumbprint in both locations kubectl -n kube-system get cm vsphere-cloud-config -o yaml
use the "tanzu mc credentials update" command to update the thumbprint in the Management Cluster and its Workload Clusters. See the steps in Update Cluster Credentials for more info.
Note: Please update the exported yaml file with the new value of thumbprint before replacing the secret. As a best practice verify if the secret is updated with the new thumbprint post replace.
In each of the commands, make sure to replace the string "WC" with your Workload Cluster name.
kubectl get secret -A | grep cpi-addon
kubectl get secret WC-vsphere-cpi-addon -o jsonpath={.data.values\\.yaml} | base64 -d > WC-vsphere-cpi-addon.yml
kubectl create secret generic WC-vsphere-cpi-addon --type=tkg.tanzu.vmware.com/addon --from-file=values.yaml=WC-vsphere-cpi-addon.yml --dry-run=client -o yaml | kubectl replace -f -
kubectl label secret WC-vsphere-cpi-addon tkg.tanzu.vmware.com/cluster-name=WC
kubectl label secret WC-vsphere-cpi-addon tkg.tanzu.vmware.com/addon-name=vsphere-cpi
# The output of this command should show the new thumbprint info
kubectl -n tkg-system get secret vsphere-cpi-data-values -o jsonpath={.data.values\\.yaml} | base64 -d | grep -i thumbprint
# The output of this command should show the new thumbprint info
kubectl -n kube-system get cm vsphere-cloud-config -o yaml
Note that he procedures above should be performed in each Workload Cluster.
In each of the following commands, make sure to replace the string "MC" with your Management Cluster name.
kubectl -n tkg-system get secret | grep vsphere-cpi
# Save the data values information of the secret into a yaml file. Make sure that the secret name here is correct and the same as the actual secret name as retrieved in the above command
kubectl -n tkg-system get secret MC-vsphere-cpi-data-values -o jsonpath={.data.values\\.yaml} | base64 -d > MC-vsphere-cpi-data-values.yml
# Open the yaml file in your favorite editor and change the thumbprint information.
# Update the secret with the modified yaml file.
kubectl create secret generic MC-vsphere-cpi-data-values -n tkg-system --type=tkg.tanzu.vmware.com/addon --from-file=values.yaml=MC-vsphere-cpi-data-values.yml --dry-run=client -o yaml | kubectl replace -f -
kubectl label secret MC-vsphere-cpi-data-values -n tkg-system tkg.tanzu.vmware.com/cluster-name=MC
kubectl label secret MC-vsphere-cpi-data-values -n tkg-system tkg.tanzu.vmware.com/addon-name=vsphere-cpi
kubectl get vsphereclusters -A
kubectl get clusters -A
kubectl edit vspherecluster WC
kubectl edit cluster WC
kubectl get vspherecluster WC -o yaml
OR
kubectl get cluster WC -o yaml
kubectl scale deploy -n capv-system capv-controller-manager --replicas=0
kubectl patch validatingwebhookconfiguration capv-validating-webhook-configuration --patch '{"webhooks": [{"name": "validation.vspherevm.infrastructure.x-k8s.io", "failurePolicy": "Ignore"}]}'
kubectl patch mutatingwebhookconfiguration capv-mutating-webhook-configuration --patch '{"webhooks": [{"name": "default.vspherevm.infrastructure.x-k8s.io", "failurePolicy": "Ignore"}]}'
kubectl get vspherevm -l cluster.x-k8s.io/cluster-name=<name-of-cluster> -n <ns-of-cluster> --no-headers=true | awk '{print $1}' | xargs kubectl patch vspherevm -n <ns-of-cluster> --type='merge' --patch '{"spec":{"thumbprint":"<new-thumbprint-value>"}}'
kubectl get vspherevm -l cluster.x-k8s.io/cluster-name=<name-of-cluster> -n <ns-of-cluster> -oyaml | grep thumbprint
kubectl patch validatingwebhookconfiguration capv-validating-webhook-configuration --patch '{"webhooks": [{"name": "validation.vspherevm.infrastructure.x-k8s.io", "failurePolicy": "Fail"}]}'
kubectl patch mutatingwebhookconfiguration capv-mutating-webhook-configuration --patch '{"webhooks": [{"name": "default.vspherevm.infrastructure.x-k8s.io", "failurePolicy": "Fail"}]}'
kubectl scale deploy -n capv-system capv-controller-manager --replicas=1
Note: Please update the exported yaml file with the new value of thumbprint before replacing the secret. As a best practice verify if the secret is updated with the new thumbprint post replace.
In each of the commands, make sure to replace the string "WC" with your Workload Cluster name.
kubectl get secret -A | grep cpi-addon
kubectl get secret WC-vsphere-cpi-addon -o jsonpath={.data.values\\.yaml} | base64 -d > WC-vsphere-cpi-addon.yml
kubectl create secret generic WC-vsphere-cpi-addon --type=tkg.tanzu.vmware.com/addon --from-file=values.yaml=WC-vsphere-cpi-addon.yml --dry-run=client -o yaml | kubectl replace -f -
kubectl label secret WC-vsphere-cpi-addon tkg.tanzu.vmware.com/cluster-name=WC
kubectl label secret WC-vsphere-cpi-addon tkg.tanzu.vmware.com/addon-name=vsphere-cpi
# The output of this command should show the new thumbprint info
kubectl -n tkg-system get secret vsphere-cpi-data-values -o jsonpath={.data.values\\.yaml} | base64 -d | grep -i thumbprint
# The output of this command should show the new thumbprint info
kubectl -n kube-system get cm vsphere-cloud-config -o yaml
Note that he procedures above should be performed in each Workload Cluster.
In each of the following commands, make sure to replace the string "MC" with your Management Cluster name.
kubectl -n tkg-system get secret MC-vsphere-cpi-addon -o jsonpath={.data.values\\.yaml} | base64 -d > MC-vsphere-cpi-addon.yml
kubectl create secret generic MC-vsphere-cpi-addon -n tkg-system --type=tkg.tanzu.vmware.com/addon --from-file=values.yaml=MC-vsphere-cpi-addon.yml --dry-run=client -o yaml | kubectl replace -f -
kubectl label secret MC-vsphere-cpi-addon -n tkg-system tkg.tanzu.vmware.com/cluster-name=MC
kubectl label secret MC-vsphere-cpi-addon -n tkg-system tkg.tanzu.vmware.com/addon-name=vsphere-cpi
kubectl -n kube-system get cm vsphere-cloud-config -o yaml
kubectl get vsphereclusters -A
NAMESPACE NAME AGE
default tkg-test 62d
default tkg-wld 83d
tkg-system tkg-mgmt 83d
kubectl edit vspherecluster WC
kubectl get vspherecluster WC -o yaml
kubectl scale deploy -n capv-system capv-controller-manager --replicas=0
kubectl patch validatingwebhookconfiguration capv-validating-webhook-configuration --patch '{"webhooks": [{"name": "validation.vspherevm.infrastructure.x-k8s.io", "failurePolicy": "Ignore"}]}'
kubectl get vspherevm -l cluster.x-k8s.io/cluster-name=<name-of-cluster> -n <ns-of-cluster> --no-headers=true | awk '{print $1}' | xargs kubectl patch vspherevm -n <ns-of-cluster> --type='merge' --patch '{"spec":{"thumbprint":"<new-thumbprint-value>"}}'
kubectl get vspherevm -l cluster.x-k8s.io/cluster-name=<name-of-cluster> -n <ns-of-cluster> -oyaml | grep thumbprint
kubectl patch validatingwebhookconfiguration capv-validating-webhook-configuration --patch '{"webhooks": [{"name": "validation.vspherevm.infrastructure.x-k8s.io", "failurePolicy": "Fail"}]}'
kubectl scale deploy -n capv-system capv-controller-manager --replicas=1