TKG 2.5.x, 2.5.1, 2.5.2, 2.5.3, 2.5.4
TCA 3.x, 3.1, 3.1.1, 3.2, 3.4
TCP 5.0, 5.0.1, 5.1
cloud-provider-vsphere-credentials Secret is located in the kube-system namespace of every workload cluster.Create the TKG-CPI-Role role in vCenter Server with the following privileges:
Cns
Searchable
Datastore
Browse datastore
Sessions
Message
Validate session
Storage views
View
Virtual Machine
Provisioning
Allow read-only disk access
Allow virtual machine download
Create a local cpi user with vsphere.local as the domain name, and set an appropriate password.
Assign Permissions to Objects
Go to the Hosts and Clusters view.
Right-click the Datacenter where TKG cluster will be deployed.
Select Permissions and click Add.
Enter the [email protected] user.
Select the TKG-CPI-Role role.
Check the Propagate to children checkbox.
SSH into the management cluster Control Plane node using the capv user.
Download the attached update_cpi_vcenter_credential script
Apply executable permissions
chmod +x ./update_cpi_vcenter_credential
Prepare an input CSV file containing the workload cluster names and the new vCenter credentials (username and password);
Note: Ensure all passwords are provided in base64-encoded format:
echo -n '<vcenter_user_password>' | base64
Generate a CSV file that includes the workload cluster name, username, and base64 encoded password:
echo '<workload_cluster_name>,<vcenter_user_name>,<base64_encoded_vcenter_user_password>' > clusters.csv
Run the update_cpi_vcenter_credential script with the parameters of csv files:
./update_cpi_vcenter_credential {csv_file_path}
Example:
./update_cpi_vcenter_credential /tmp/clusters.csv
update_cpi_vcenter_credential script to be reapplied. | Cluster Operation | Standard cluster |
| Add Control plane | Reapply script required |
| Delete Control plane | Reapply script required |
| Modify Control plane | Reapply script required |
| Add worker node | Not needed |
| Delete worker node | Not needed |
| Modify worker node | Not needed |
| Deploy NF | Not needed |
| Upgrade cluster | Reapply script required |
| Certificate renew immediately from UI | Reapply script required |
| Certificate renew auto rotation | Not needed |
Note: Updating the credentials for a classy (ClusterClass-based) clusters is a one-time operation and will not require the script to be re-applied.
update_cpi_vcenter_credential script with the new password for the user.