You can view the deployment status and changes of all Kubernetes resources when you deploy an application in the application center. You can choose different methods to deploy applications based on data sources. The application center allows you to use templates on GitHub or orchestration templates in the Container Service for Kubernetes (ACK) console. This topic describes how to use different templates to deploy applications.

Prerequisites

The following operations are complete:

Use a template on GitHub to deploy an application

You can use a template or a Helm chart on GitHub to deploy an application.

You can perform the following steps to deploy an application by using the YAML file ingress-demo on GitHub:

  1. Log on to the ACK console.
  2. In the left-side navigation pane, choose Application Center > Application.
  3. In the upper-right corner of the Application page, click NEW APP and configure the parameters.
    The following table describes the parameters.
    • GENERAL

      Deploy an application
      Parameter Description

      Application Name

      The name of the application. You can specify a custom name.

      SYNC POLICY

      This example uses the manual mode. Valid values:
      • Manual: If the template on GitHub is updated, you must manually update the template in the ACK console.
      • Automatic: If the template on GitHub is updated, ACK automatically updates the template and deploys the application based on the latest template.
    • SOURCE

      1
      Parameter Description

      Data source

      The data source used to deploy an application. Valid values: GIT, HELM, and Custom template. This example uses GIT as the data source.

      Repository URL

      The URL for downloading the template from GitHub. We recommend that you set this parameter to a value that starts with HTTPS.

      For example, https://github.com/xianlubird/argocd-example-apps.git.

      Revision

      The version of the template. This example uses the HEAD version. You can set this parameter to the target version.

      Path

      The path where the template is stored. Set this parameter to a file directory.

      For example, ingress-demo.

      Notice You cannot set this parameter to a file name.
    • DESTINATION

      2
      Parameter Description

      Cluster

      The cluster to which the application is deployed. This example uses the default cluster. You can set this parameter to the target cluster.

      Namespace

      The namespace of the target cluster.

      Directory/Helm/Kustomize

      The format of the template. This example uses the Directory format.

      • Directory: You can select DIRECTORY RECURSE on demand. We recommend that you select DIRECTORY RECURSE if the path that stores the template has multiple levels.
      • Helm:
        • VALUES FILES: the values.yaml file in the Helm chart.
        • VALUES: the parameters in the values.yaml file. You can modify these parameter values.
      • Kustomize:
        • NAME PREFIX: the prefix of a template. You can specify this parameter to search for templates that use the prefix.
        • NAME SUFFIX: the suffix of a template. You can specify this parameter to search for templates that use the suffix.
  4. Click CREATE.
    After you create an application, you can view the details of the application in the application center.
    Notice After you create an application, the application center parses the template. However, the Kubernetes resources specified in the template are not deployed to the cluster.
  5. In the upper-right corner of the details page of the application, click SYNC. In the dialog box that appears, select the resources that you want to deploy and click SYNC.
    3
    Parameter Description

    PRUNE

    Deletes the application resources that are not specified in the template.

    DRY RUN

    Parses the template only. The application resources specified in the template are not deployed to the cluster.

    APPLY ONLY

    Deploys the application resources specified in the template to the cluster. This option is applicable to most scenarios.

    FORCE

    Forcibly aligns application resources in the cluster to those specified in the template.

    SYNCHRONIZE RESOURCES

    Lists all resources specified in the template. You can deploy certain or all resources based on your needs. By default, all resources are deployed.

    This example deploys all resources.

    In the upper-left corner of the details page of the application, click APP DETAILS to view application details. The following figure shows the details page of an application.4

Use a Helm chart on GitHub to deploy an application

If you use a Helm chart on GitHub to deploy an application, you can follow the procedure described in Use a template on GitHub to deploy an application.

Figure 1. A Helm chart
5

When you create an application, select Helm as the template format. You can set the parameters in VALUES to different values for different clusters.

Figure 2. Helm chart parameters
6

Use an orchestration template to deploy an application

You can also use an orchestration template in the ACK console to deploy an application. You can perform the following steps:

  1. Log on to the ACK console.
  2. In the left-side navigation pane, choose Marketplace > Orchestration Templates.
  3. Select the target template and click Create Application.
  4. In the Deploy section, click Create and then click Save.
  5. In the left-side navigation pane, choose Application Center > Application.
  6. Configure the parameters of the orchestration template.

    When you create an application, select Custom template in the SOURCE section. Click Template and specify the target template. For more information about how to create an application, see Use a template on GitHub to deploy an application.