All Products
Search
Document Center

Elastic container instance lifecycle

Last Updated: Mar 09, 2021

This topic describes different states in the lifecycle of an elastic container instance. You can design your business logic based on the states. Elastic Container Instance is seamlessly connect to Kubernetes. You can directly use elastic container instances as pods in Kubernetes clusters.

Elastic container instance status

The following table describes the states that an elastic container instance may go through during its lifecycle.

State

Description

Scheduling

The elastic container instance is being created.

Pending

One or more containers in the elastic container instance are being started, and no containers are running.

Running

All containers in the elastic container instance are created, and at least one container is running or restarting.

Restarting

The elastic container instance is restarting.

Updating

The elastic container instance is being updated.

Succeeded

All containers in the elastic container instance are terminated after successful runs and not about to restart.

Failed

All containers in the elastic container instance are terminated, and at least one container is terminated due to running failure, which indicates that the container exits with a non-zero code or is terminated by the system.

Expired

The elastic container instance is a preemptible instance and is terminated due to resource expiration and recycling.

ScheduleFailed

The elastic container instance failed to be created. The system deletes the elastic container instance after 24 hours, and you are not charged for the elastic container instance.

Notice

The restart policy of an elastic container instance applies only to containers within the elastic container instance. The elastic container instance itself does not automatically restart.

The following figure shows the status transition of an elastic container instance in its lifecycle.Lifecycle

Container status

State

Description

Waiting

The container is pending creation and is not in the Running state.

Typically, application containers remain in the Waiting state while an InitContainer is running until the InitContainer exits.

Running

The container is created and running.

Terminated

The container is terminated and exits after a successful or failed run.