All Products
Search
Document Center

Container Service for Kubernetes:Application management

Last Updated:Mar 26, 2026

This topic shows how to create, deploy, update, and roll back applications using GitOps on Container Service for Kubernetes (ACK).

After completing this topic, you will be able to:

  • Create and deploy an application from a Git repository

  • View the application's sync status and resource topology

  • Update the application by committing to Git

  • Roll back to a previous version

Prerequisites

Before you begin, ensure that you have:

Create and deploy an application

The following steps use an example application named echo-server-demo, deployed to an ACK cluster with API server address https://47.97.XX.XX:6443.

Note

If you cannot access GitHub due to network issues, replace https://github.com/AliyunContainerService/gitops-demo.git with https://code.aliyun.com/shuwei.hsw/gitops-demo.git.

Via the Argo CD console

  1. Log on to the Argo CD UI. For more information, see Use the Argo CD UI to log on to Argo CD.

  2. In the left-side navigation pane, click Applications, then click + NEW APP.

  3. In the panel that appears, configure the following parameters and click CREATE.

    SectionParameterValue
    GENERALApplication Nameecho-server-demo
    Project Namedefault
    SYNC POLICYSelect Automatic from the drop-down list. With Automatic, Argo CD scans the Git repository every 3 minutes and syncs changes to the cluster. With Manual, you trigger syncs manually by clicking SYNC.
    SYNC OPTIONSSelect AUTO-CREATE NAMESPACE
    SOURCERepository URLSelect https://github.com/AliyunContainerService/gitops-demo.git from the drop-down list
    RevisionHEAD
    Pathmanifests/helm/echo-server
    DESTINATIONCluster URL/Cluster NameSelect your target cluster from the drop-down list
    Namespaceecho-server-demo
    HELMVALUES FILESvalues.yaml
  4. After the application is created, view its status on the Applications page. If SYNC POLICY is set to Manual, click SYNC to deploy the application. The application is successfully deployed when its status shows both Healthy and Synced.

    image.png

Via the Argo CD CLI

  1. Create the application:

    argocd app create echo-server-demo \
      --repo https://github.com/AliyunContainerService/gitops-demo.git \
      --path manifests/directory/production \   # subdirectory containing the application manifests
      --dest-namespace echo-server-demo \        # namespace where the application is deployed
      --dest-server https://47.97.XX.XX:6443 \  # API server endpoint of the ACK cluster
      --sync-policy none                         # none (default): manual sync; auto: automatic sync every 3 minutes

    Expected output:

    application 'echo-server-demo' created
  2. Deploy the application to the cluster:

    argocd app sync echo-server-demo

    Expected output:

    TIMESTAMP                  GROUP        KIND         NAMESPACE                 NAME             STATUS      HEALTH        HOOK  MESSAGE
    2022-10-17T16:43:20+08:00  apps         Deployment   echo-server-demo          echo-server      OutOfSync   Missing
    2022-10-17T16:43:20+08:00               Service      echo-server-demo          echo-server      OutOfSync   Missing
    2022-10-17T16:43:20+08:00               Service      echo-server-demo          echo-server      Synced      Progressing
    2022-10-17T16:43:20+08:00               Service      echo-server-demo          echo-server      Synced      Progressing         service/echo-server-demo created
    2022-10-17T16:43:20+08:00  apps         Deployment   echo-server-demo          echo-server      OutOfSync   Missing             deployment.apps/echo-server-demo created
    2022-10-17T16:43:20+08:00  apps         Deployment   echo-server-demo          echo-server      Synced      Progressing         deployment.apps/echo-server-demo created
    
    Name:               echo-server-demo
    Project:            default
    Server:             https://47.97.XX.XX:6443
    Namespace:          echo-server-demo
    URL:                https://127.0.0.1:65384/applications/echo-server-demo
    Repo:               https://github.com/AliyunContainerService/gitops-demo.git
    Target:
    Path:               manifests/directory/production
    SyncWindow:         Sync Allowed
    Sync Policy:        <none>
    Sync Status:        Synced to  (02af62b)
    Health Status:      Progressing
    
    Operation:          Sync
    Sync Revision:      02af62bf21e76f53ebfcc282c45865d2308c****
    Phase:              Succeeded
    Start:              2022-10-17 16:43:19 +0800 CST
    Finished:           2022-10-17 16:43:20 +0800 CST
    Duration:           1s
    Message:            successfully synced (all tasks run)
    
    GROUP  KIND        NAMESPACE         NAME              STATUS  HEALTH       HOOK  MESSAGE
          Service     echo-server-demo  echo-server-demo  Synced  Progressing        service/echo-server-demo created
    apps   Deployment  echo-server-demo  echo-server-demo  Synced  Progressing        deployment.apps/echo-server-demo created

    The sync completes when Phase shows Succeeded and Message shows successfully synced (all tasks run). Resources initially appear as Progressing while Kubernetes starts the pods — they transition to Healthy once all pods are running.

View applications

Via the Argo CD console

  1. In the left-side navigation pane, click Applications to see all applications.

  2. Click an application name to open its details page, which shows the resource topology and the status of each Kubernetes resource.

    image.png

Via the Argo CD CLI

List all deployed applications:

argocd app list

Expected output:

NAME         CLUSTER                     NAMESPACE         PROJECT  STATUS  HEALTH   SYNCPOLICY  CONDITIONS  REPO                                                       PATH                            TARGET
echo-server  https://47.97.XX.XX:6443    echo-server-demo  default  Synced  Healthy  <none>      <none>      https://github.com/AliyunContainerService/gitops-demo.git  manifests/directory/production

A STATUS of Synced and HEALTH of Healthy confirms the application is running and matches the Git repository state.

Update an application

In GitOps, Git is the single source of truth. To update a deployed application, commit changes to the Git repository — do not modify cluster resources directly. If the sync policy is set to auto, Argo CD picks up the change automatically within 3 minutes. With none (manual), run argocd app sync after committing.

  1. Commit your changes to the Git repository.

  2. Sync the changes to the cluster:

    argocd app sync echo-server-demo
  3. Verify the update by accessing the application:

    curl XX.XX.XX.XX:8080/version    # Replace XX.XX.XX.XX with the application's IP address

    Expected output:

    "Hello Echo Server v2.0"

Roll back an application

Via the Argo CD console

  1. In the left-side navigation pane, click Applications. Find echo-server-demo and click its name.

  2. On the application details page, click HISTORY AND ROLLBACK. On the historical version page, select the target version and click Rollback in the upper-right corner.

    image

  3. Return to the application details page to confirm the version after the rollback is complete.

Via the Argo CD CLI

  1. View available historical versions:

    argocd app history echo-server-demo

    Expected output:

    ID  DATE                           REVISION
    0   2022-10-17 16:43:20 +0800 CST   (02af62b)
    1   2022-10-17 16:52:49 +0800 CST   (56ae547)

    The highest ID is the current version. In this example, ID 1 (revision 56ae547) is current. To roll back, target a lower ID.

  2. Roll back to revision 02af62b (ID 0):

    argocd app rollback echo-server-demo 0
  3. Verify the rollback by accessing the application:

    curl XX.XX.XX.XX:8080/version    # Replace XX.XX.XX.XX with the application's IP address

    Expected output:

    "Hello Echo Server v1.0"