Cloud Native 9 min read

Effortlessly Distribute Apps Across Multiple ACK One Clusters

This guide explains how ACK One enables fast, Git‑free distribution of Kubernetes application resources from a single fleet cluster to multiple target clusters, covering the required CRDs, policy definitions, step‑by‑step YAML examples, and migration from single‑cluster to high‑availability multi‑cluster deployments.

Alibaba Cloud Infrastructure
Alibaba Cloud Infrastructure
Alibaba Cloud Infrastructure
Effortlessly Distribute Apps Across Multiple ACK One Clusters

In modern cloud environments, enterprises rely on multi‑cluster architectures to improve elasticity, fault tolerance, and scalability, but distributing and managing application resources across clusters can be complex and time‑consuming. ACK One introduces a native multi‑cluster application resource distribution capability that lets users treat a single fleet cluster as the source and push resources to any number of target clusters without using Git, simplifying operations and ensuring consistency.

Key CRDs and Policies

The feature introduces two groups of custom resources:

Distribution policies – ClusterPropagationPolicy and PropagationPolicy, which select the application resources to be propagated.

Override policies – ClusterOverridePolicy and OverridePolicy, which define per‑cluster customizations.

Both policy types use a five‑tuple ( apiVersion, kind, namespace, name, labelSelector) to identify source resources and a three‑tuple ( labelSelector, fieldSelector, clusterIds) to select destination clusters.

Step‑by‑Step Deployment Example

Create a simple Deployment in the fleet cluster:

apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: demo
  name: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx
        ports:
        - containerPort: 80

Create a ClusterPropagationPolicy that selects the above deployment and lists the target clusters:

apiVersion: one.alibabacloud.com/v1alpha1
kind: ClusterPropagationPolicy
metadata:
  name: example
spec:
  resourceSelectors:
  - apiVersion: apps/v1
    kind: Deployment
    namespace: demo
    name: nginx
  placement:
    clusterAffinity:
      clusterIds:
      - ${cluster1-id}
      - ${cluster2-id}
      - ${cluster3-id}

(Optional) Define an OverridePolicy for per‑cluster tweaks, such as reducing replicas in one cluster and changing the image registry:

apiVersion: one.alibabacloud.com/v1alpha1
kind: OverridePolicy
metadata:
  name: example
  namespace: demo
spec:
  resourceSelectors:
  - apiVersion: apps/v1
    kind: Deployment
    name: nginx
  overrideRules:
  - targetCluster:
      clusterNames:
      - ${cluster1-id}
    overriders:
      imageOverrider:
      - component: Registry
        operator: add
        value: registry.cn-hangzhou.aliyuncs.com
      plaintext:
      - operator: replace
        path: /spec/replicas
        value: 1

The ACK One controller continuously watches the creation, modification, and deletion events of the application resources, distribution policies, and override policies, and synchronizes the desired state to all selected clusters.

The namespace of the original resource is preserved during propagation, and the fleet cluster supports label‑based selection and static weight scheduling for replica‑based workloads.

Single‑Cluster to Multi‑Cluster Migration for High Availability

Deploying an application in a single region leaves it vulnerable to regional failures. By migrating to a multi‑cluster setup, the same application can run in different regions or availability zones, dramatically improving disaster recovery and uptime.

Create a fleet cluster and add the existing single cluster as an associated cluster.

In the fleet cluster, create a propagation policy that selects the desired application resources and includes the original cluster as a target.

Publish the resources to the fleet cluster; because the fleet is a standard Kubernetes cluster, existing CI/CD pipelines can push updates without modification.

Update the policy to add additional target clusters; the controller automatically distributes the resources, keeping namespaces consistent across all clusters.

After these steps, the application runs in multiple clusters with seamless failover, while the fleet cluster continues to serve as the central management point.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud NativeKubernetesMulti-ClusterYAMLCRDACK OneApplication Distribution
Alibaba Cloud Infrastructure
Written by

Alibaba Cloud Infrastructure

For uninterrupted computing services

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.