How to manually update kubeconfig/cluster configuration
book
Article ID: 345733
calendar_today
Updated On:
Products
VMware Telco Cloud Automation
Issue/Introduction
K8S VIMs are disconnected in TCA-M, or the status of a cluster is disconnected (indicated with a red dot) in TCA-CP Appliance Management portal (9443).
In TCA UI under partner system, Harbor is registered and connected Kubernetes cluster as VIM. In cluster Harbor add-on gets added successfully. But in partner system still it shows "Initiated", it should show "Enable".
CNF installations fail.
Attempts to create a new cluster results in the message: "Token has expired. Please login again."
Environment
2.x 3.x
Cause
The cluster config stored inside TCA-DB for the clusters has expired
The cluster certificates are renewed, but not synced with the TCA appliances.
Resolution
Manually update the kube-config/cluster configuration
SSH to the management cluster with endpoint IP as the capv user.
Get the kubeconfig secret content for the disconnected k8s cluster.
5.Go to the TCA-UI -> Virtual Infrastructure -> cluster.
6.Click on the 'Edit' button.
7.Update the Kubernetes Config with the secret content obtained from step 3.
8.Click on 'Update'
This will set the VIM status to pending for about 30-40 seconds. It should return to the 'connected' status.
9.Navigate to https://<TCA-CP_IP>:9443 in a browser
10.Locate the cluster, edit and update the kube config file with the secret content obtained from step 3.
11.Repeat steps 1 through 10 for any other affected clusters.
12.Restart the TCA Manager appliance
13.Restart the TCA CP Appliance
14.Verify the K8S VIMs status in TCA-M, or the status of the Workload Cluster in the TCA-CP Appliance Management portal (9443). They should be in a connected state.