Federating an Application

MCP allows you to federate an application to deploy it from only one cluster to multiple clusters across clouds.

Constraints

The application federation function is not supported in the CN East-Shanghai2 region.

Procedure

  1. Log in to the cluster console. In the navigation pane, choose Workloads > Deployments.
  2. Select the Deployment that needs to be federated, and click More > Federate under the Operation column.
  3. On the Specify Basic Information page, configure parameters.

    • Cluster: Select the cluster whose application needs to be federated.
    • Pods: Set the number of pods in the cluster. You can set it based on actual requirements.

  4. Click Next. On the Customize Cluster Configurations page, customize configurations for the selected cluster.

    • Container Settings
      • Configure basic container information.
        • Image Name: Name of the image. You can click Change Image to select another image.
        • Image Tag: Tag of the image to be deployed. Specify this parameter if you choose to use an open source image.
        • Container Name: Container name, which can be changed.
        • Container Specifications: Resource amount that users can apply for and the maximum amount of resources that are available to users. For details, see Setting Container Specifications.
          • Request: Minimum amount of resources required for running a container.
          • Limit: If a container is overloaded, the system may be faulty. To avoid this situation, set the maximum limits for the container resource quotas to ensure that container resources do not exceed the limits.
      • Configure container lifecycle, that is, set the commands that need to be executed in each phase during container management.
      • Set the health check function that checks whether containers and services are running properly. Two types of probes are provided: liveness probes and readiness probes. For details, see Setting Health Check for a Container.
        • Liveness Probe: The probe restarts the workload when detecting that the workload pod is unhealthy.
        • Readiness Probe: The probe sets the workload to the unready state when detecting that the workload pod is unhealthy. In this way, the service traffic will not be directed to the workload pod.
      • Set environment variables.

        Environment variables can be added to a container. In general, environment variables are used to set parameters.

        In the Environment Variables area, click Add Environment Variable.

      • Specify security settings.

        Set container permissions to protect the system and other containers from being affected.

        Enter the user ID to set container permissions and prevent systems and other containers from being affected.

      • Configure data storage.

        Mounting data storage to containers applies to scenarios where persistent storage and high disk I/O are required. For details, see Federated PVCs.

    • Upgrade Policy
      Rolling upgrade and In-place upgrade are supported.
      • Rolling upgrade: An old pod is gradually replaced with a new pod. During the upgrade, service traffic is evenly distributed to the old and new pods to ensure service continuity.

        Maximum Number of Unavailable Pods: Maximum number of unavailable pods allowed in a rolling upgrade. If the number is equal to the total number of pods, services may be interrupted. Minimum number of alive pods = Total pods – Maximum number of unavailable pods

      • In-place upgrade: Old pods are deleted before new pods are created. Services will be interrupted during an in-place upgrade.
    • Graceful Deletion

      Set a time window for pre-stop commands to finish execution before a workload is forcibly deleted. If workload processes are not terminated after the time window elapses, the workload will be forcibly deleted.

    • Migration Policy

      Set a time window for the system to schedule the workload pod to another available node when the node where the workload pod is running is unavailable. The default value is 300s.

    • Pod Label

      System-defined labels are added during workload creation and cannot be modified. You can click Add Label to add labels.

  5. Click OK.