Skip to content

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

  1. After logging into CHAI™, click on the project where you want to manage container lifecycle, then click Cruize.

    Cruize

  2. 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.

Add Lifecycle

  • Then deployment definition page will be opened, now go to Containers tab. Select container and then go to Lifecycle tab 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.

    Add Lifecycle


Adding a New Lifecycle

  1. Click the Add New Lifecycle button. After clicking, the following form will be displayed.

    Add Lifecycle

  2. 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
  3. Provide all commands and click the Save button.

    Add Lifecycle


Edit Lifecycle

To edit lifecycle commands:

  • Click the Edit icon as shown in the image below.

    Edit Lifecycle


Delete Lifecycle

To delete a lifecycle:

  • Click the Delete icon as shown in the image below.

    Delete Lifecycle