Container Service Kubernetes (ACK) supports application triggers. You can use application triggers for different methods. This topic describes how to use an application trigger to redeploy an application.

Prerequisites

  • An ACK cluster is created. For more information, see Create an ACK dedicated cluster.
  • An application is created. You can use this application to create and test a trigger. In this example, an NGINX application is created.

Procedure

  1. Log on to the ACK console and click Clusters in the left-side navigation pane.
  2. On the Clusters page, click the name of a cluster and choose Workloads > Deployments in the left-side navigation pane.
  3. On the Deployments tab, set the namespace, find the application that you want to manage, and then click Details in the Actions column of the application.
  4. On the NGINX application details page, click the Triggers tab and click Create Trigger.
  5. In the Create Trigger dialog box, set Action to Redeploy and click OK.
    Note Only Redeploy is available in the Action drop-down list.
    Redeploy

    After the trigger is created, a trigger link appears in the Trigger Link Address column on the Triggers tab.

    Trigger
  6. Copy the link and open it in your browser. A message appears to display specific information such as the request ID.
    Trigger
  7. Go to the NGINX application details page. A new pod appears on the page.
    New pod

    After the new pod is deployed, the original pod is automatically deleted.

What to do next

You can call a trigger by using GET or POST in a third-party system. For example, you can run the curl command to call a trigger.

To call the trigger to redeploy an application, run the following command:

curl https://cs.console.aliyun.com/hook/trigger?token=xxxxxxx