You may face multiple challenges if you want to distribute an application across multiple clusters. For example, the kubeconfig files that are used to access the clusters are not unique, different configurations are used to deploy the application across clusters, no unified view is provided to check the deployment progress of the application, and risks may arise when you deploy the application across multiple clusters. To resolve these challenges, you can use the multi-cluster management feature provided by Alibaba Cloud Distributed Cloud Container Platform (ACK One) to distribute an application across multiple clusters. This topic describes how to use the multi-cluster management feature provided by ACK One to distribute an application across multiple clusters.

Background information

You can create master instances in ACK One to manage clusters. Master instances are developed based on open source KubeVela and Open Cluster Management. Master instances provide standard Kubernetes APIs that can be used to distribute Kubernetes resources across multiple clusters. Master instances also allow you to use different configurations to deploy an application across clusters and perform canary releases for an application among clusters based on workflows.

How application distribution works

To use a master instance in ACK One to distribute an application across multiple clusters, perform the following two steps:

  1. Create Kubernetes resources on the master instance for the application. The resources are distributed to the clusters that are associated with the master instance based on the rules that are specified in Step 2. The following table describes the resources that can be distributed across clusters.
    Note The distribution of the following resources cannot trigger the creation of other relevant resources because master instances do not monitor the creation of resources. For example, the distribution of Deployments cannot trigger the creation of pods and the distribution of Services cannot trigger the creation of endpoints.
    Kind apiVersion
    Deployment apps/v1
    Service v1
    Ingress networking.k8s.io/v1
    ConfigMap v1
    Secret v1
    StatefulSet apps/v1
    PersistentVolumeClaim v1
  2. Create rules on the master instance to distribute the resources. You can create rules to reference the Kubernetes resources that are created in Step 1, select the clusters in which you want to deploy the application, use different configurations to deploy the application, and use the workflows feature to distribute the application.

Features

Feature Description References
Deploy an application across multiple clusters You can use a master instance in ACK One to deploy an application across the clusters that are associated with the master instance. To use the preceding method, you must create Kubernetes resources, such as Deployments, Services, and Ingresses, for the application. Then, you must specify the clusters in which you want to deploy the application and create the application. You can view the deployment progress of the application in each cluster. Deploy an application across multiple clusters
Use different configurations to deploy an application across multiple clusters ACK One allows you to use a master instance to deploy an application across multiple clusters. You can also use different configurations to deploy the application across the clusters. For example, you can specify different numbers of replicated pods, OS images, or environment variables for the application. Use different configurations to deploy an application across multiple clusters
Use canary releases to deploy an application across clusters ACK One provides the workflows feature. This feature allows you to use canary releases to deploy an application. For example, you can first deploy an application in a testing cluster. If the application passes the test, you can deploy the application in production clusters. This helps minimize potential risks. Use canary release to deploy an application
Select clusters to distribute an application When you use a master instance in ACK One to distribute an application, you must select the clusters to which you want to distribute the application. ACK One allows you to distribute an application to the clusters that are associated with a master instance by specifying the cluster names or labels. Select a cluster to distribute applications
Rules for using different configurations to deploy an application across multiple clusters ACK One allows you to use a master instance to deploy an application across multiple clusters. You can also use different configurations to deploy the application across the clusters. Rules for using different configurations to deploy an application across multiple clusters