Updated on 2024-09-19 GMT+08:00

Updating a kubeconfig File

This section describes how to update the kubeconfig file of a cluster to handle leakage or expiration of cluster certificates or perform routine security maintenance.

Only the kubeconfig files of attached clusters and partner cloud clusters can be updated.

Prerequisites

  • The target cluster has not joined any fleet.
  • The anp-agent add-on has been installed in the cluster to ensure that the new kubeconfig file can be used for connectivity detection with the cluster.

Procedure

  1. Log in to the UCS console. In the navigation pane, choose Fleets.
  2. Click Clusters Not in Fleet and locate the cluster whose kubeconfig file needs to be updated.
  3. Click in the upper right corner.

    Figure 1 Updating the kubeconfig file

  4. Upload the local kubeconfig file and select the context address that is the same as the original address.

    Figure 2 Uploading the kubeconfig file

  5. Click OK.