Creating a Workload for Multiple Clusters
You can enable cluster federation for a fleet to deploy and manage multiple types of workloads across clusters.
This section describes how to enable cluster federation for a fleet to quickly create a Deployment.
Enabling Cluster Federation
- Log in to the UCS console.
- In the navigation pane, choose Fleets. On the Fleets tab, locate the target fleet and click Enable.
- In the displayed dialog box, click OK. Then, wait until cluster federation is enabled.
It takes about 10 minutes to enable cluster federation. You can click the federation status to view the progress. After cluster federation is enabled, a message will be displayed.
Creating a Deployment
- Log in to the UCS console. In the navigation pane, choose Fleets.
- On the Fleets tab, click the name of the federation-enabled fleet to access its console.
- In the navigation pane, choose Workloads. On the Deployments tab, click Create from Image in the upper right corner.
- Configure basic information about the Deployment.
Table 1 Basic information about the Deployment Parameter
Description
Type
Select Deployment.
Namespace
Select the namespace that the Deployment belongs to.
Description
Describe the Deployment.
Pods
Set the number of pods running the Deployment in each cluster. The default value is 2.
- Configure the container parameters.
A pod can have multiple containers. You can click Add Container on the right to configure multiple containers for a pod. In this example, only the basic information about a container is configured.
Table 2 Basic information Parameter
Description
Container Name
Enter a name.
Image Name
Click Select Image and select the image used by the container.
Image Tag
Select the required image tag.
Pull Policy
Image update or pull policy. The options are as follows: If you select Always, the image is pulled from the image repository each time. If you do not select Always, the existing image of the node is preferentially used. If there is no image, the image is pulled from the image repository.
CPU Quota
- Request: Enter the minimum number of CPU cores required by a container. The default value is 0.25.
- Limit: Enter the maximum number of CPU cores available for a container. To avoid system faults resulting from excessive use of container resources, do not leave Limit unspecified.
Memory Quota
- Request: Enter the minimum amount of memory required by a container. The default value is 512.
- Limit: Enter the maximum amount of memory available for a container. When the memory usage exceeds the memory limit, the container will be terminated.
Init Container
Whether to use the container as an init container.
NOTE:An init container is a special container that runs before application containers in a pod. For details, see Init Containers.
- Click Next: Scheduling and Differentiation.
Table 3 Cluster scheduling policy parameters Parameter
Description
Scheduling
Select Weight or Auto balancing.
- Weight: Manually set the weight for each cluster. Pods will be allocated to each cluster by weight.
- Auto balancing: The Deployment is automatically deployed in the selected clusters based on available resources.
Mode
- If you set Scheduling to Weight, you need to manually set the weight of each cluster. If you set the weight of a cluster to a value other than 0, the cluster will be automatically selected as a cluster that the Deployment can be deployed in. If you set the weight to 0, the Deployment will not be deployed in that cluster. Weights cannot be set for clusters in abnormal state.
- If you set Scheduling to Auto balancing, you can click a cluster to select it as a cluster that the Deployment can be deployed in.
- Click Create Workload. Then, click Back to Workload List to view the created Deployment.
Follow-up Operations
After creating a workload for multiple clusters, you can manage the workload lifecycle as follows:
- Configure the Service and ingress for the workload. For details, see Services and Ingresses.
- Configure storage for the workload. For details, see Storage.
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