cleanup-pods

Definition

Cleans up Kubernetes pods (created by KubernetesExecutor/KubernetesPodOperator) in evicted/failed/succeeded/pending states.

Usage

$ airflow kubernetes cleanup-pods [-h]
                                [--min-pending-minutes MIN_PENDING_MINUTES]
                                [--namespace NAMESPACE] [-v]

Arguments

Parameter Description

--min-pending-minutes

Deletes the pending pods created before the selected time interval. Default value is 30 minutes (30). The minimum value is 5

--namespace

Kubernetes namespace. Default value is Kubernetes namespace in Airflow configuration

-h, --help

Print out the help manual for this command

-v, --verbose

Make logging output more verbose

Examples

To delete pods created more than an hour ago, run:

$ airflow kubernetes cleanup-pods --min-pending-minutes 60
Found a mistake? Seleсt text and press Ctrl+Enter to report it