Help Center/ Ubiquitous Cloud Native Service/ User Guide/ Fleets/ Managing Clusters Not in the Fleet
Updated on 2024-09-19 GMT+08:00

Managing Clusters Not in the Fleet

Clusters for which a fleet is not selected during registration or clusters removed from a fleet will be displayed on the Clusters Not in Fleet tab. This section describes how you can manage clusters that are not added to a fleet, including adding clusters to a fleet and associate a permission policy with the fleet.

Registering Clusters to a Fleet

  1. Log in to the UCS console. In the navigation pane, choose Fleets.
  2. Click the Clusters Not in Fleet tab. In the card view of the target cluster, click in the upper right corner.
  3. Select a fleet. A registered cluster will follow the fleet permissions policies, not its own ones.
  4. After you select a fleet, the current permission and adjusted permission are displayed. Confirm the information and click OK.

    After the cluster is registered to a fleet, the cluster is displayed in the fleet and will be centrally managed by the fleet.

Associating a Permission Policy

  1. Log in to the UCS console. In the navigation pane, choose Fleets.
  2. On the Clusters Not in Fleet tab, click in the upper right corner of the card view of the target cluster.

    Figure 1 Viewing clusters

  3. On the displayed page, click Update Fleet Permissions. Then, associate the created permission policy with the namespace of the cluster.

    • Namespace: Select All namespaces or Namespace. All namespaces includes the existing namespace of the cluster and the namespace to be added to the cluster. Namespace indicates the custom range of namespaces. UCS provides several common namespaces, such as default, kube-system, and kube-public. You can also add a namespace, which should exist in the cluster.

      If you select namespaces, permission policies take effect only on namespace resources, not cluster resources. For details about namespace and cluster resources, see Kubernetes Resource Objects.

    • Set Permissions: Select permissions from the drop-down list box. You can select multiple permissions at a time to batch grant permissions.

    If different namespaces are associated with different permission policies (for example, the default namespace is associated with the readonly permission policy and the development namespace is associated with the develop permission policy), you can click to add multiple relationships of permission granting.

  4. Click OK.

    If you need to update the permission policy of the cluster, select the namespace and permission again using the preceding method.

Unregistering a Cluster

  1. Log in to the UCS console. In the navigation pane, choose Fleets.
  2. On the Clusters Not in Fleet tab, click in the upper right corner of the card view of the destination cluster.
  3. In the Unregister Cluster dialog box, read the precautions carefully, confirm the risks, and click OK.
  4. (Optional) After an attached cluster is unregistered, run the following command to uninstall the agent component from the destination cluster:

    kubectl -n kube-system delete deployments/proxy-agent secret/proxy-agent-cert

  5. (Optional) After an on-premises cluster is unregistered, run the uninstallation command to delete the cluster from the local host and clear resources:

    ./ucs-ctl delete cluster [Cluster name]

    If the cluster fails to be deleted, perform operations in How Do I Manually Clear Nodes of an On-premises Cluster?.