All Products
Search
Document Center

Elastic Container Instance:Lifecycle of an elastic container instance

Last Updated:Apr 01, 2026

An elastic container instance moves through a series of states from creation to termination. Understanding these states helps you design monitoring logic, handle billing boundaries, and respond correctly to terminal outcomes.

Instance states

Instance states fall into three categories:

  • Transition states: the system is actively performing an operation. The instance will move to another state when the operation completes.

  • Stable states: the instance is running normally and will remain in this state until an external action or internal event occurs.

  • Terminal states: the instance has reached a final outcome and will not change further. Billing stops when the instance enters a terminal state.

StateCategoryDescriptionBilled
SchedulingTransitionThe system is allocating underlying resources. The instance does not yet exist as a running entity.No
PendingTransitionResources are allocated. One or more containers are starting, but none are running yet.Yes
RunningStableAll containers are created, and at least one container is running or restarting.Yes
RestartingTransitionThe instance is restarting.Yes
UpdatingTransitionThe instance configuration is being updated.Yes
TerminatingTransitionThe instance is being terminated. When a running instance configured with preStop is being deleted, the instance enters the Terminating state. After the preStop hook runs, the instance is deleted.Yes
SucceededTerminalAll containers ran to completion and exited successfully. No containers will restart.No
FailedTerminalAll containers have exited. At least one container exited with a non-zero code or was terminated by the system.No
ExpiredTerminalThe instance is a preemptible instance that was reclaimed due to resource expiration.No
ScheduleFailedTerminalThe instance failed to be created. The system deletes the instance after 24 hours, and you are not charged.No
Important

The restart policy applies only to containers within the instance — the instance itself does not automatically restart. This means that when all containers exit, the instance transitions to Succeeded or Failed based on the exit outcomes, not back to Running.

The following diagram shows how an instance transitions between states during its lifecycle.

生命周期新

After termination

When an instance reaches a terminal state:

  • The underlying computing resources are reclaimed.

  • By default, associated resources — such as elastic IP addresses (EIPs) — that were created alongside the instance are released together with it.

Metadata retention

After an instance enters a terminal state (Succeeded, Failed, or Expired), its metadata is retained as follows:

Time since entering terminal stateMetadata retained
Within 1 hourAll metadata
After 1 hourThe 100 most recent entries per region

Container states

Each container within an instance has its own state, independent of the instance state.

StateDescription
WaitingThe container is waiting to start. Application containers remain in this state while an InitContainer is running, until the InitContainer exits.
RunningThe container is running.
TerminatedThe container has exited, either after a successful run or due to a failure.