Alibaba Cloud Container Service Kubernetes supports the application trigger function. You can use an application trigger in many ways.
- You have created a Kubernetes cluster. For more information, see Create a Kubernetes cluster.
- You have created an application that is used to create an application trigger and test the trigger. In this example, create an nginx application.
- Log on to the Container Service console.
- Click Details at the right of the target nginx application.
and select a cluster and namespace. Click
- On the nginx application details page, click Create Trigger on the right side of the trigger bar.
- In the pop-up dialog box, click Redeploy and click Confirm.
Note Currently, only the redeploy action is supported.
After the trigger is created, a trigger link is displayed in the trigger bar on the nginx application detail page.
- Copy the trigger link and visit it in the browser. A message is returned on the web
page, containing information such as the request ID.
- Back to the nginx application detail page, you can see that a new pod appears.
After a period of time, the nginx application removes the old pod and keeps only the new pod.
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.
Call the redeploy trigger as follows: