Deploying an application into multiple clusters
Now that we already have multiple remote clusters, we can go ahead and use ACM and ArgoCD to make our pipeline able to deploy into all of them at once. We are going to change the deploy task to use an ApplicationSet
object that will be responsible for deploying our application into both OpenShift remote clusters at once.
Figure 14.31 – Pipeline with deployment into multiple clusters
To make ArgoCD aware of the clusters managed by ACM, we first need to create a few objects, such as the GitOpsCluster
Custom Resource. We covered a detailed explanation of these objects in Chapter 11, OpenShift Multi-Cluster GitOps and Management. Run the following commands to create these objects:
$ cd OpenShift-Multi-Cluster-Management-Handbook/chapter14/Multicluster-Deployment $ oc apply -f GitOpsCluster/
Now let’s create and run the pipeline, which uses an ApplicationSet
object to deploy the application into...