Skip to content
Docs Try Aspire

LifecycleV1

Class sealed net10.0
📦 Aspire.Hosting.Kubernetes v13.1.2-preview.1.26125.13
Represents the lifecycle configuration for a Kubernetes Pod container.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class LifecycleV1
{
// ...
}
The LifecycleV1 class defines the lifecycle events for a container, which include hooks or actions that can be triggered at specific points during the container's lifecycle. It allows specifying custom logic to be executed either before the container is terminated (preStop) or after the container is started (postStart). This configuration is particularly useful for managing cleanup operations, initialization tasks, or other custom behaviors during these lifecycle phases.
View all constructors
PostStartget; set
Represents the post-start lifecycle event handler in a Kubernetes Pod.
PreStopget; set
Gets or sets the pre-stop hook for defining actions to execute before the container stops.
View all properties