Create a multi-cluster application

更新时间:
复制 MD 格式

The multi-cluster GitOps console simplifies multi-cluster application orchestration with Argo CD ApplicationSet. From a single ApplicationSet configuration, ACK automatically generates and deploys one or more applications across multiple clusters. This topic explains how to create a multi-cluster application in the ACK One console.

Prerequisites

Procedure

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

  2. On the Multi-cluster GitOps page, click the Dingtalk_20231226104633.jpg icon next to the fleet name and select the target fleet.

  3. Click Create Multi-cluster Application > GitOps to open the Create Multi-cluster Application - GitOps page.

  4. On the Quick Create tab, configure the parameters below.

    Parameter

    Description

    Example

    Multi-cluster Application Set Name

    ApplicationSet name.

    appset-echo-server-demo

    Project

    Project that owns the ApplicationSet.

    default

    Source Code URL

    Source code repository URL.

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

    Git Branch

    Git branch for the application.

    main

    Path

    Relative path to the application's YAML manifests in the Git repository.

    manifests/helm/echo-server

    Destination cluster

    Target clusters for deployment. If empty, deploys to all Argo CD-managed clusters except in-cluster (the control plane where Argo CD runs).

    Namespace

    Namespace in the destination clusters.

    demo

    Application Name

    Generated application name. Supported variables:

    • {{.name}}

    • {{.metadata.annotations.cluster_name}}

    • {{.metadata.annotations.cluster_id}}

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

    Advanced configuration

    Synchronization Policy (Application Set)

    PRESERVE RESOURCES ON DELETION: Retains resources created by child applications when the ApplicationSet is deleted.

    Synchronization Policy (Application)

    • Manual: Sync manually.

    • Automatic: Sync automatically.

      • PRUNE RESOURCES: Deletes cluster resources no longer defined in the Git repository.

      • SELF HEAL: Reconciles the application's live state with the desired state in Git to prevent drift from manual changes.

    Sync options:

    Parameter

    Description

    SKIP SCHEMA VALIDATION

    Skips resource schema validation, equivalent to running kubectl apply --validate=false. Schema validation is enabled by default.

    AUTO-CREATE NAMESPACE

    Creates the target namespace if it does not exist.

    PRUNE LAST

    Prunes resources after all other resources are deployed and healthy.

    APPLY OUT OF SYNC ONLY

    Applies changes only to resources in OutOfSync status to speed up sync.

    RESPECT IGNORE DIFFERENCES

    Respects the ignoreDifferences configuration during sync. Fields in ignoreDifferences are not checked for discrepancies.

    SERVER-SIDE APPLY

    Enables Kubernetes Server-Side Apply. Use when a manifest exceeds the annotation size limit, when patching resources not fully managed by Argo CD, or for declarative field ownership tracking.

    REPLACE

    Updates resources with a replace action (kubectl replace) instead of the default apply action. replace deletes the existing resource before creating the new one; apply patches it in place.

    RETRY

    Retry strategy for failed sync operations, including retry count, interval, and backoff settings.

    See Argo CD Sync Options.

  5. If Quick Create does not meet your needs, select the Create from YAML tab and define the ApplicationSet in YAML.

    Note

    Quick Create syncs with Create from YAML; changes update the YAML on the Create from YAML tab.

  6. Click OK. You are redirected to the Multi-cluster GitOps page. After creation, the ApplicationSet appears in the list. The Status column shows the deployment result, and the Application column shows the number of generated applications.

  7. Click the number in the Application column for your ApplicationSet Name. The Multi-cluster Application Details dialog box lists the generated applications. Click an Application Name to open it in the Argo CD UI. Verify the status is Healthy and Synced to confirm successful deployment.