All Products
Search
Document Center

Container Service for Kubernetes:Use triggers to redeploy workloads

Last Updated:Dec 11, 2025

ACK clusters support triggers. When a trigger link is accessed, the workload automatically restarts. This topic describes how to use triggers.

Introduction to triggers

By creating triggers, you can automatically restart specified workloads in specific scenarios to improve operational efficiency. Examples:

Scenario

Trigger Action

Description

Configuration update triggers restart

Update configuration and restart related pods

Monitor ConfigMap changes. When the configuration changes, you can restart the application by calling a trigger.

External trigger signal initiates deployment

Automatically deploy new application versions

When a new image is pushed to the image repository, automatically trigger application deployment through a webhook to ensure the application is updated after code changes.

Prerequisites

Procedure

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, find the cluster you want to manage and click its name. In the left navigation pane, choose Workloads > Deployments.

  3. On the Deployments page, find Nginx, and click Details in the Actions column.

  4. On the Nginx details page, click the Triggers tab, and then click Create Trigger.

  5. In the Create Trigger dialog box, set Action to Redeploy, and then click Confirm.

    Note

    Currently, Action supports only the redeploy feature.

    After the trigger is created, a trigger link appears in the trigger column on the Nginx details page.

    触发连接器

  6. Copy the trigger link and access it in your browser. The page returns a message that contains information such as the status code and request ID.

    触发器

  7. Return to the Nginx details page and click the Pods tab to observe the new pod that appears. After the new pod is deployed, the Nginx workload deletes the old pod and keeps only the new pod.

Use triggers through other methods

Standard HTTP GET or POST requests can trigger the action. For example, you can run the curl https://cs.console.alibabacloud.com/hook/trigger?token=xxxxxxx command to trigger the action.

Note

In some Shell versions, the ? character may be recognized as a wildcard, which causes the curl command to fail. You can solve this problem by adding quotation marks around the link, such as curl "https://cs.console.alibabacloud.com/hook/trigger?token=xxxxxxx".

References

You can also manage triggers through OpenAPI. For more information, see: