Container Lifecycle¶
Kubernetes supports the postStart and preStop lifecycle events. Kubernetes sends the postStart event immediately after a container is started, and it sends the preStop event immediately before the container is terminated.
Accessing Container Lifecycle¶
-
After logging into CHAI™, click on the project where you want to manage container lifecycle, then click Cruize.

-
Click on the blueprint version count on the blueprint card. After clicking the count, the blueprint versions page will be displayed, which contains a list of blueprint versions.

-
Then deployment definition page will be opened, now go to
Containerstab. Select container and then go toLifecycletab as shown in the below image. -
Click on the View configurations kebab menu option or click on the blueprint version name to view blueprint configurations. Go to the Deployments tab and click Edit deployment definition from the Action column of any deployment.
-
The deployment definition page will open. Now go to the Containers tab. Select a container, then go to the Lifecycle tab as shown in the image below.

Adding a New Lifecycle¶
-
Click the Add New Lifecycle button. After clicking, the following form will be displayed.

-
Add lifecycle by entering the following details:
Field Description PreStop Exec command Enter comma-separated pre-stop commands PostStart Exec command Enter comma-separated post-start commands -
Provide all commands and click the Save button.

Edit Lifecycle¶
To edit lifecycle commands:
-
Click the Edit icon as shown in the image below.

Delete Lifecycle¶
To delete a lifecycle:
-
Click the Delete icon as shown in the image below.
