Argo CD monitors the changes in application orchestration in a Git repository, compares the application orchestration with the status of applications in a cluster, and automatically pulls and deploys the changes to the cluster. Argo CD also allows you to manually deploy the changes to the cluster. You can integrate Argo CD with Service Mesh (ASM) to release and update applications. This reduces O&M costs. This topic describes how to use Argo CD to implement GitOps.
Prerequisites
- An ASM instance whose Istio version is 1.12.4.50 or later is created. For more information, see Create an ASM instance.
- An ACK managed cluster is created. For more information, see Create an ACK managed cluster.
- The cluster is added to the ASM instance. For more information, see Add a cluster to an ASM instance.
- A Git repository is created.
Background information

Step 1: Install Argo CD
You can manually install Argo CD or use the built-in Argo CD feature in Application Center of Container Service for Kubernetes (ACK). In the following example, Argo CD is manually installed and integrated with ASM to implement GitOps.- For more information about how to manually install Argo CD, see Getting Started.
- Application Center of ACK provides the built-in Argo CD feature. You can use the built-in Argo CD feature without the need to manually install Argo CD. Application Center of ACK allows you to check the status of applications. You can use Git repositories and Helm charts to deploy applications of specific versions to Kubernetes clusters. This way, you can roll back or release application versions. For more information, see Application Center overview.
Step 2: Enable access to Istio resources by using the Kubernetes API on the data plane of your ASM instance
ASM provides a managed Istio-compatible control plane. The control plane of your ASM instance with which Argo CD is integrated and the data plane in which an ACK cluster resides are not in the same Kubernetes cluster environment. You must enable access to Istio resources by using the Kubernetes API on the data plane. This way, Argo CD can access Istio resources in the ASM instance in the same way as Argo CD accesses resources in the ACK cluster.
- Log on to the ASM console. In the left-side navigation pane, choose .
- On the Mesh Management page, find the ASM instance that you want to configure. Click the name of the ASM instance or click Manage in the Actions column.
- On the Basic Information page, click Enable for the Enable Data-plane KubeAPI access parameter.
- In the message that appears, click OK.
Step 3: Deploy an ingress gateway
- Log on to the ASM console. In the left-side navigation pane, choose .
- On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose .
- On the Ingress Gateway page, click Create. Set the parameters of the ingress gateway and click Create. The following table describes only some parameters of the ingress gateway. For more information about other parameters of the ingress gateway, see Create an ingress gateway service.
Parameter Description Name The name of the ingress gateway. For this example, set the parameter to ingressgateway. Gateway types The type of the ingress gateway. For this example, set the parameter to North-South IngressGateway. Port Mapping The port mappings of the ingress gateway. Click Add Port and configure the following protocols and ports: - Set the Protocol parameter to HTTP and the Service Port parameter to 80.
- Set the Protocol parameter to HTTPS and the Service Port parameter to 443.
Step 4: Use Argo CD to deploy Istio resources
You can define Istio resources as Kubernetes manifests and push the manifests to the Git repository that you use to deploy the application orchestration of your Kubernetes cluster.
- Create a sample application named bookinfo.
- View the resource status in the ASM console.
- Log on to the ASM console. In the left-side navigation pane, choose .
- On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose .
- On the VirtualService page, view the bookinfo application that is created.
- View the resource status in the ACK console.
- Log on to the ACK console and click Clusters in the left-side navigation pane.
- On the Clusters page, click the name of a cluster and choose in the left-side navigation pane.
- View the Deployments that are created.
- Access the ingress gateway.
Step 5: Deploy GitOps
Configure a traffic rule for accessing http://{IP address of the ingress gateway}/productpage. If you have not logged on, the v1 version of the reviews data is displayed. If you have logged on as the jason user, the v2 version of the reviews data is displayed.
- Modify the local YAML files of the reviews VirtualService and the reviews-v1 Deployment.
- Modify the YAML file of the reviews VirtualService to contain the following content:
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: reviews spec: hosts: - reviews http: - match: - headers: end-user: exact: jason route: - destination: host: reviews subset: v2 - route: - destination: host: reviews subset: v1 ---
- Modify the YAML file of the reviews-v1 Deployment to contain the following content:
apiVersion: apps/v1 kind: Deployment metadata: namespace: argocd name: reviews-v1 labels: app: reviews version: v1 spec: replicas: 2
- Modify the YAML file of the reviews VirtualService to contain the following content:
- Run the following command to push the configurations of the reviews-v1 Deployment to the Git repository:
git add * git commit -m "reviews-v1" git push
- Synchronize Git configurations to the cluster. If you have enabled the automatic synchronization feature for Argo CD, Git configurations are automatically synchronized to the cluster. If not, you can perform the following steps to synchronize Git configurations to the cluster:
- Verify the result.