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 disconnected k8s cluster's VIP as the capv user.
View the contents of the '/etc/kubernetes/admin.conf' file.
Go to the TCA-UI -> Virtual Infrastructure -> cluster.
Click on the 'Edit' button.
Update the Kubernetes Config with the admin.conf content obtained from step 3.
Click on 'Update'
This will set the VIM status to pending for about 30-40 seconds. It should return to the 'connected' status.
Navigate to https://<TCA-CP_IP>:9443 in a browser
Locate the cluster, edit and update the kube config file with the admin.conf content obtained from step 3.
Repeat steps 1 through 9 for any other affected clusters.
Restart the TCA Manager appliance
Restart the TCA CP Appliance
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.