All Products
Search
Document Center

Container Service for Kubernetes:Create a multi-cluster application

Last Updated:Sep 13, 2024

Distributed Cloud Container Platform for Kubernetes (ACK One) allows you to use Argo CD ApplicationSets to implement multi-cluster application orchestration. An ApplicationSet allows you to create and deploy one or more applications to multiple clusters by using one orchestration template. This topic describes how to use the ACK One console to create a multi-cluster application.

Prerequisites

Procedure

  1. Log on to the ACK One console. In the left-side navigation pane, choose Fleet > Multi-cluster Applications.

  2. In the upper-left corner of the Multi-cluster Applications page, click the Dingtalk_20231226104633.jpg button next to the name of the Fleet instance, and select the target Fleet instance from the drop-down list.

  3. Choose Create Multi-cluster Application > GitOps to go to the Create Multi-cluster Application - GitOps page.

  4. On the Quick Create tab, fill in the content based on the following configuration information.

    Parameter

    Description

    Example

    Multi-cluster Application Set Name

    The name of the application.

    appset-echo-server-demo

    Project

    The corresponding project of the application.

    default

    Source Code URL

    The source code URL of the application.

    https://github.com/AliyunContainerService/gitops-demo.git

    Git Branch

    The Git branch of the application.

    main

    Path

    The relative path of the YAML file defined by the application in the Git repository.

    manifests/helm/echo-server

    Destination Cluster

    The destination cluster for application deployment. If no cluster is specified, all clusters in Argo CD except for the one where the Fleet instance and Argo CD reside will be treated as the destination cluster.

    Namespace

    The namespace of the cluster where the application is deployed.

    demo

    Application Name

    The application name. By default, the following parameters are supported:

    • {{.name}}

    • {{.metadata.annotations.cluster_name}}

    • {{.metadata.annotations.cluster_id}}

    {{.metadata.annotations.cluster_id}}-echoserver

    Advanced Settings

    Synchronization Policy (Application Set)

    PRESERVE RESOURCES ON DELETION: If you select this option, the child resources of the application are retained when this application set is deleted.

    Synchronization Policy (Application)

    • Manual: manual synchronization.

    • Automatic: automatic synchronization.

      • PRUNE RESOURCES: After you select this option, if no corresponding configuration exists in the Git repository for a resource, the resource is automatically deleted.

      • SELF HEAL: After you select this option, the actual state is automatically synchronized with the desired state of the Git repository. This prevents status mismatch due to modifications or other reasons.

    The following table describes the parameters that need to be synchronized:

    Parameter

    Description

    SKIP SCHEMA VALIDATION

    Specifies whether to perform format verification for resources. This parameter is equivalent to "kubectl apply --validate=true|false". Default value: true.

    AUTO-CREATE NAMESPACE

    Automatically creates missing namespaces.

    PRUNE LAST

    Prunes resources after resources are deployed and in a healthy state.

    APPLY OUT OF SYNC ONLY

    Synchronizes only resources that are in the OutOfSync state to speed up the synchronization process.

    RESPECT IGNORE DIFFERENCES

    Fields in the desired state are ignored during the synchronization phase.

    SERVER-SIDE APPLY

    Enables Kubernetes Server-Side Apply. You can enable this feature in the following scenarios:

    1. The resource is too large and the allowed annotation size exceeds the upper limit.

    2. You need to patch existing resources on the cluster that are not fully managed by Argo CD.

    3. You want to use a more declarative approach to track the field management of users.

    REPLACE

    Modifies resources by using the replace method instead of the default apply method. The replace method deletes resources and recreates the resources. The apply method updates resources by using patches.

    RETRY

    Allows you to specify the number of retry attempts, the retry interval, and the retry interval increment after a synchronization failure.

    For more information about synchronization options, see Argo CD Sync Options.

  5. If the Quick Create method cannot meet your requirement, you can also select the Create from YAML tab and fill in the relevant content based on the following example.

    Note

    Quick Create is linked with Create from YAML. Any changes in Quick Create are mapped to the YAML content of Create from YAML.

  6. After the configuration is complete, click OK, and you can view the corresponding Status on the Multi-cluster Application page. 4f94c85b2da653c00f17f6e3439ce9ce

  7. Click the corresponding number under the Application column to view the summary information of the applications created by the multi-cluster application. Click the application name in the Application Name column to go to the Argo CD UI. cc83f3c5287d42465e7803337cd399d3