Managing Fleets
This section describes how to create a fleet, add clusters to the fleet, associate a permission policy with the fleet, remove clusters from the fleet, unregister clusters from the fleet, and delete the fleet.
Creating a Fleet
- Log in to the UCS console. In the navigation pane, choose Fleets. On the Fleets tab, click Create Fleet.
- Enter the fleet information.
Figure 1 Creating a fleet
- Fleet Name: Enter a name, starting with a lowercase letter and not ending with a hyphen (-). Only lowercase letters, digits, and hyphens (-) are allowed.
- Add Cluster: Clusters not in the fleet are displayed in the list. You can add clusters when creating a fleet or after the fleet is created. If you do not select any cluster, an empty fleet will be created. After the fleet is created, see Adding a Cluster.
- Description: description of the fleet to which the cluster is added
A registered cluster will follow the fleet permissions policies, not its own ones.
- Click OK.
Adding a Cluster
- Log in to the UCS console. In the navigation pane, choose Fleets.
- In the card view of the target fleet, click Add Cluster, or click in the upper right corner.
You can also click the fleet name to access the fleet console. In the navigation pane, choose Container Clusters. On the displayed page, click Add Cluster in the upper right corner.
Figure 2 Adding a cluster to a fleet
- Select one or more existing clusters. A cluster can only be added to one fleet. The clusters displayed in the list are those have not been added to any fleet.
Figure 3 Adding a cluster
- A registered cluster will follow the fleet permissions policies, not its own ones.
- In a federation-enabled fleet, registered clusters automatically become federated. For details about cluster federation, see Enabling Cluster Federation.
- Click OK.
Associating a Permission Policy
- Log in to the UCS console. In the navigation pane, choose Fleets.
- In the card view of the target fleet, click in the upper right corner.
Figure 4 Associating a permission policy with a fleet
- On the displayed page, click Update Fleet Permissions or Set Permissions. Then, associate the created permission policy with the namespace of the fleet.
Figure 5 Updating a permission policy
- Namespace: Select All namespaces or Namespace. All namespaces includes the existing namespace of the fleet and the namespace to be added to the fleet. 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.
- Namespace: Select All namespaces or Namespace. All namespaces includes the existing namespace of the fleet and the namespace to be added to the fleet. 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.
- Click OK.
If you need to update the permission policy of the fleet, select the namespace and permission again using the preceding method.
Removing a Cluster from a Fleet
- Log in to the UCS console. In the navigation pane, choose Fleets.
- On the Fleets tab, click the fleet name to access the fleet console.
- In the navigation pane, choose Container Clusters. In the card view of the target cluster, click in the upper right corner.
- Read the precautions carefully and confirm the risks. Then click OK.
After a cluster is removed from a fleet, it is displayed on the Clusters Not in Fleet tab. You can add the cluster to the fleet again. For details, see Managing Clusters Not in the Fleet.
Unregistering a Cluster from a Fleet
- Log in to the UCS console. In the navigation pane, choose Fleets.
- On the Fleets tab, click the fleet name to access the fleet console.
- In the navigation pane, choose Container Clusters. In the card view of the target cluster, click in the upper right corner.
- In the Unregister Cluster dialog box, read the precautions carefully, confirm the risks, and click OK.
- (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
- (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?
Deleting a Fleet
If a fleet is no longer used, you can delete it. There are two restrictions on deletion: there is no cluster in the fleet and cluster federation has been disabled for the fleet. If there are clusters in the fleet, you can remove the clusters from the fleet and then add them to another fleet. If cluster federation has been enabled for the fleet, disable it following Disabling Cluster Federation.
- Log in to the UCS console. In the navigation pane, choose Fleets.
- On the Fleets tab, locate the target fleet and click in the upper right corner.
- In the dialog box displayed, click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot