You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workers in Airflow 3 do not connect directly to the metadata db however they still require a metadata secret.
Deploy a simple multinamespace mode setup. Do not place the metadata secret in the worker pod's namespace (k8sexecutor) and you will see that the tasks will fail. Now place a fake metadata secret in the namespace and you will observe that the tasks will start running. The worker requires this secret but does not actually use it for a connection.
What you think should happen instead?
Workers should not need the metadata connection secret.
I reproduced this with Airflow 3.2.2, KubernetesExecutor, and multiNamespaceMode: true on a local Kubernetes cluster.
The scheduler, API server, Dag processor, and database ran in one namespace. A single-task Dag used a pod override to launch its worker in a separate namespace. I provided the worker's required ConfigMaps, service account, and other template-referenced Secrets, but left the metadata Secret absent.
Observed results:
Without the metadata Secret in the worker namespace, the Airflow worker container remained in CreateContainerConfigError. Kubernetes reported secret "repro322-metadata" not found.
After adding that Secret with a correctly formatted PostgreSQL URI containing deliberately invalid credentials, a fresh Dag run completed successfully. The worker reported exit_code=0 and final_state=success and used the Execution API.
The apparent cause is the shared Helm environment helper. The worker pod template includes standard_airflow_environment, which adds both AIRFLOW__DATABASE__SQL_ALCHEMY_CONN and AIRFLOW_CONN_AIRFLOW_DB as mandatory metadata Secret references. Kubernetes must resolve these references before starting the container, even though this Airflow 3 task does not need valid metadata database credentials.
I also compared the local worker template, helper, and default values used for this reproduction with upstream main at b9aa889577; all three files are identical. This was a runtime test of Airflow 3.2.2, not an execution test of Airflow built from main.
I’m preparing a focused chart fix with regression tests and will open a PR shortly.
Activity
anzinmhd commentedon Oct 16, 2026
I reproduced this with Airflow 3.2.2,
KubernetesExecutor, andmultiNamespaceMode: trueon a local Kubernetes cluster.The scheduler, API server, Dag processor, and database ran in one namespace. A single-task Dag used a pod override to launch its worker in a separate namespace. I provided the worker's required ConfigMaps, service account, and other template-referenced Secrets, but left the metadata Secret absent.
Observed results:
CreateContainerConfigError. Kubernetes reportedsecret "repro322-metadata" not found.exit_code=0andfinal_state=successand used the Execution API.The apparent cause is the shared Helm environment helper. The worker pod template includes
standard_airflow_environment, which adds bothAIRFLOW__DATABASE__SQL_ALCHEMY_CONNandAIRFLOW_CONN_AIRFLOW_DBas mandatory metadata Secret references. Kubernetes must resolve these references before starting the container, even though this Airflow 3 task does not need valid metadata database credentials.I also compared the local worker template, helper, and default values used for this reproduction with upstream
mainatb9aa889577; all three files are identical. This was a runtime test of Airflow 3.2.2, not an execution test of Airflow built frommain.I’m preparing a focused chart fix with regression tests and will open a PR shortly.