Deleting an Apache Airflow™ cluster
Deleting an AirflowCluster deletes the Apache Airflow™ cluster and its metadata database. Any automatically created buckets, along with the DAG files and task logs stored inside them, are also deleted.
This deletion does not delete or clear any objects explicitly attached via bucketRef or accessKeyRef.
Alert
Before deletion, save the DAG files and logs you need. History and settings from the metadata database will be deleted along with the cluster. This operation is irreversible.
Using the CLI
-
Check for deletion protection:
kubectl get airflowcluster <cluster_name> \ -n <namespace> \ -o jsonpath='{.spec.deletionProtection}' -
If the protection is on, disable it:
kubectl patch airflowcluster <cluster_name> \ -n <namespace> \ --type=merge \ -p '{"spec":{"deletionProtection":false}}' -
Delete the resource:
kubectl delete airflowcluster <cluster_name> \ -n <namespace> -
Wait for the deletion to complete:
kubectl get airflowcluster <cluster_name> \ -n <namespace> \ -w
During deletion, the status.phase becomes Deleting. Wait for the operation to complete. If your cluster remains in this state for too long, refer to this troubleshooting guide.