Apache Airflow

Deploy Apache Airflow 3 on infrastructure you control: Helm chart or virtual machines, executor choice, DAG delivery, secrets, SSO, recovery and the Airflow 2 to 3 upgrade.

On this page

Is Apache Airflow 3 the right orchestrator, and how do you deploy it?

Apache Airflow 3 fits batch and scheduled pipelines where Python DAGs coordinate work that other systems perform. Deploy it as separate components with an external metadata database, a chosen executor, controlled DAG delivery and a production auth manager.

Airflow is an Apache Software Foundation project under the Apache-2.0 license. Its repository describes it as a platform to programmatically author, schedule and monitor workflows. Typical jobs include loading a warehouse, running dbt or Spark jobs, calling APIs and ordering dependent steps. It works best when tasks hand heavy processing to systems built for it while Airflow tracks order, retries and state.

Version status drives planning. The supported versions page lists Airflow 3 at 3.4.0 in the Maintenance state, first released April 22, 2025. Airflow 2 reached end of life on April 22, 2026, with 2.11.2 as its last listed release, and versions past end of life receive no fixes. Airflow follows strict SemVer, so a major release such as 3 includes breaking changes. New installations should start on Airflow 3. Existing Airflow 2 installations need an upgrade plan.

Check the platform before sizing. The prerequisites page lists Python 3.11 to 3.14, Kubernetes 1.31 to 1.37, PostgreSQL 14 to 18 and MySQL 8.0, 8.4 and Innovation releases for Airflow 3.4.0. It recommends at least 4GB of memory and states that Linux distributions are the only supported production environment. MariaDB is not supported as a backend, and SQLite is for tests and local development only.

What components make up an Airflow 3 deployment?

Each component scales and fails on its own. Give each a resource budget, health checks and findable logs.

API server

Serves the user interface and REST API, and is the path through which running tasks reach Airflow's state. It replaces the Airflow 2 webserver and starts with airflow api-server. Helm chart users rename webserver values to apiServer. Run more than one where downtime matters, and watch its response time.

Scheduler

Decides which task instances are ready and hands them to the executor. Airflow supports more than one scheduler for performance and resilience, coordinated through the metadata database. A surviving scheduler adopts tasks from a dead one. When runs start late, check scheduler heartbeat and queued task counts first.

DAG processor

Parses DAG files and stores their structure. In Airflow 3 it runs as its own process, started with airflow dag-processor, so slow top-level DAG code shows up here first. DAG authors can run arbitrary code in this component, because Airflow does not sandbox DAG code. Give it its own resource budget and logs.

Triggerer

Runs deferrable tasks that wait on external events without holding a worker slot. It also executes DAG author code, so it belongs under the same access controls as workers. Size it for the number of deferred tasks you expect, and check its logs first when sensors appear stuck.

Executor and workers

Run the task code, in local processes, a Celery worker pool or one Kubernetes pod per task. Workers hold whatever network access and credentials the deployment gives them. Keep clocks synchronized, for example with NTP, because otherwise log retrieval from Celery workers can fail with forbidden errors.

Metadata database

Holds runs, task state, connections and variables in PostgreSQL or MySQL. Production uses an external database. With the Helm chart, set postgresql.enabled: false, keep credentials in a Kubernetes Secret, and add PgBouncer with pgbouncer.enabled: true to reduce open connections.

CeleryExecutor vs KubernetesExecutor: which Airflow executor fits?

The executor shapes isolation, startup time and what the platform team runs. Airflow 3 can also run several executors and assign tasks to each. See the executor docs.

OptionHow tasks runFitsPlan for
LocalExecutorLocalExecutor is the default. It runs tasks as subprocesses on the scheduler host.Small installations.The capacity of one host, shared with the scheduler.
CeleryExecutorStanding workers pull tasks from a central queue held by a broker such as Redis or RabbitMQ.Steady volumes of short tasks.Broker availability, autoscaling (the Helm chart supports KEDA) and dependencies shared by all workers.
KubernetesExecutorEach task runs in its own pod.Tasks with different dependencies, resources or isolation needs.Pod startup for every task, image management and namespace quotas.
Multiple executorsExecutors are listed comma-separated in the [core] executor setting, such as LocalExecutor,CeleryExecutor. The first is the default, and a task can name its own with executor="LocalExecutor".Mixed workloads that used the hybrid executors removed in Airflow 3.A written rule for which DAGs use which executor, so routing is not guessed at incident time.
Removed in Airflow 3SequentialExecutor, CeleryKubernetesExecutor and LocalKubernetesExecutor are removed in Airflow 3.Airflow 2 installations that depend on any of them.Running multiple executors is the recommended replacement for the hybrid pair. Inventory the DAGs that relied on them before the upgrade.

How should you deliver DAG code: baked image, git-sync or DAG bundles?

Copy DAGs into the image and deploy a uniquely tagged image per release. Rollback means redeploying the previous tag, and every component runs the same code and dependencies. This suits teams that already build and promote images through environments. The cost is a build and rollout for every DAG change, so decide whether authors can accept that pace. Official images are published on Docker Hub as apache/airflow, and the Helm chart uses them as its base.

How do you upgrade Airflow 2 to Airflow 3?

Move to the latest Airflow 2 release first. The upgrade guide requires Airflow 2.7 or later, preferably the latest 2.x. Back up the metadata database before anything else, and shut Airflow down for the backup if no hot backup exists.

The guide lists the steps in order: airflow db clean, airflow dags reserialize, a ruff check with AIR301, airflow config update then airflow config update --fix, and airflow db migrate. Start the API server with airflow api-server and the DAG processor separately with airflow dag-processor. Helm chart users rename webserver settings to apiServer.

Code changes are the larger effort. Task code can no longer open database sessions or import Airflow models. It uses the Task SDK (airflow.sdk imports) or the REST API through its Python client. SubDAGs, SequentialExecutor, the hybrid executors and SLAs are removed, and Deadline Alerts replace SLAs. The REST API moves from /api/v1 to the FastAPI-based /api/v2. Context variables such as execution_date, prev_ds and next_ds are gone. Both catchup_by_default and create_cron_data_intervals default to False.

Authentication changes too. Simple auth manager is the Airflow 3 default, and auth routes gain an /auth prefix, so /oauth-authorized/google becomes /auth/oauth-authorized/google. Update redirect URLs registered with your identity provider. To keep FAB, install the FAB provider and set auth_manager to FabAuthManager. Inventory DAGs, custom operators, plugins and anything that reads the metadata database. Run the upgraded stack in parallel against test connections, then pause each DAG in the old environment before enabling it in the new one to avoid duplicate runs.

How do SSO, Keycloak, Fernet keys and task access work in Airflow 3?

Airflow 3 delegates sign-in and permissions to an auth manager. Only one is active at a time, set by auth_manager in the [core] section, and the docs call switching later a heavy operation. The default Simple auth manager is intended for development and testing. The FAB auth manager stores users and permissions in the Airflow database and supports OAuth and LDAP sign-in. The Keycloak auth manager hands users, roles, groups and permissions to Keycloak, and its provider docs mark it alpha and experimental. Map identity provider groups to Airflow roles so access follows joiner and leaver processes.

Airflow uses Fernet to encrypt passwords in connection and variable configuration, with the key set in [core] fernet_key or AIRFLOW__CORE__FERNET_KEY. A secrets backend such as HashiCorp Vault or Azure Key Vault can supply connections and variables from an existing secrets service. Per the Helm guide, set a unique API secret key per instance with apiSecretKey or apiSecretKeySecretName, and a static JWT secret with jwtSecretName and a planned rollover procedure. Source these from Kubernetes Secrets or an equivalent, outside committed values files.

Workers run whatever DAG code says, with the network access and credentials they hold. In Airflow 3, workers receive no database credentials and talk to the Execution API with short-lived JWT tokens, but only if the deployment withholds credentials from worker environment variables and configuration. The production deployment guide says to limit JWT signing keys, database credentials and Fernet keys to the components that need them, and not to rely mainly on network segmentation. Use separate worker identities per environment, restrict egress to the systems pipelines need, and limit who can trigger DAGs that touch sensitive data.

How do you run Airflow with high availability and recover it?

Recovering Airflow means recovering its state, its code and the keys that decrypt its connections.

Metadata database

Back it up with point-in-time recovery and test restores. Keep run history bounded with airflow db clean or the chart's periodic cleanup, enabled by databaseCleanup.enabled: true with databaseCleanup.retentionDays. The restore result is part of the plan, because a backup that was never restored is unproven.

Fernet key and secrets

Store the Fernet key with the backup plan. Without it, encrypted connections in a restored database cannot be read. Rotate it by procedure: put the new key before the old one in fernet_key, run airflow rotate-fernet-key, then remove the old key. Record custody of the key and the JWT secret.

Schedulers and API servers

Run more than one of each where downtime matters. Multiple schedulers coordinate through row-level locks, controlled by use_row_level_locking. With that setting False, run only one scheduler. PostgreSQL 12+ and MySQL 8.0+ need no extra setup. Orphaned task checks let a surviving scheduler adopt work from a dead one.

Task logs

Configure remote logging with remote_logging = True and remote_base_log_folder under [logging]. Setting delete_local_logs = True removes local files after upload. Most task handlers send logs only on task completion, and depending on the executor, task logs may be lost once a pod or worker is gone.

DAG code and rollback

Plan rollback for code as well as data. With a baked image, redeploy the previous tag. With GitDagBundle, versioning is supported. LocalDagBundle, S3DagBundle and GCSDagBundle do not support versioning, so keep the source repository as the record of what ran. Practice the rollback before an incident.

Who owns what when Airflow runs in production?

The platform team runs Airflow. DAG authors own their pipelines and the data they produce. Writing the split down before go-live shortens every later incident.

Platform

  • Monitor scheduler heartbeat, DAG parse time, queued tasks and database connections.
  • Upgrade Airflow, providers and the base image on a schedule.
  • Manage executor capacity and worker images.
  • Keep clocks synchronized across machines.

DAG authors

  • Keep top-level DAG code light so parsing stays fast.
  • Set retries, timeouts and alerts per pipeline.
  • Pin provider versions and test in a lower environment.
  • Move off removed features such as SubDAGs and SLAs.

Security

  • Review role mappings, connections and secrets access.
  • Control who can merge DAG code and trigger sensitive DAGs.
  • Rotate the Fernet key and service credentials by procedure.
  • Keep credentials out of worker environments where possible.

Data owners

  • Define freshness expectations for pipeline outputs.
  • Approve backfills that rewrite history.
  • Serve as the escalation point when a pipeline fails.

Airflow deployment questions

What does Airflow 2 end of life mean for us?

Airflow 2 reached limited maintenance on October 22, 2025 and end of life on April 22, 2026, with 2.11.2 as its last listed release. Versions past end of life receive no fixes, including security fixes. Staying on Airflow 2 means accepting unpatched issues in Airflow and its dependencies. Plan the move using the upgrade guide.

Do we need Kubernetes to deploy Apache Airflow?

No. Airflow runs on virtual machines with LocalExecutor or CeleryExecutor. The official Helm chart makes Kubernetes deployments repeatable, uses the official apache/airflow image and implements several rolling-restart upgrade scenarios. Airflow 3.4.0 supports Kubernetes 1.31 through 1.37. Linux is the only supported production environment, so plan Linux hosts either way.

Can we use Airflow Docker Compose in production?

The Compose file defines the scheduler, DAG processor, API server, worker, triggerer, init, postgres and redis services. The Docker Compose guide says it does not provide the security guarantees required for production and recommends the official Helm chart on Kubernetes. Use it for learning. The airflow standalone command runs on SQLite and is for development only.

How do CeleryExecutor and KubernetesExecutor differ?

CeleryExecutor suits steady volumes of short tasks, because standing workers pull from a central queue and avoid per-task startup. It needs a broker and shared worker dependencies. KubernetesExecutor runs each task in its own pod, which suits tasks with different dependencies, resources or isolation needs, at the cost of pod startup per task. Airflow 3 can run both and assign tasks to each.

How do we rotate the Airflow Fernet key?

Put the new key before the old key, comma-separated, in fernet_key under [core] or in AIRFLOW__CORE__FERNET_KEY. Run airflow rotate-fernet-key, then remove the old key. Store the key with your backup plan, because encrypted connections in a restored database cannot be read without it. The Fernet docs describe the procedure.

Can Airflow run multiple schedulers for high availability?

Yes. Airflow supports more than one scheduler for performance and resilience, coordinated through the metadata database with row-level locks. PostgreSQL 12+ and MySQL 8.0+ need no extra setup. If use_row_level_locking is False, run only one scheduler. A surviving scheduler adopts tasks from a dead one. In the Helm chart, pgbouncer.enabled: true reduces open PostgreSQL connections.

Is Keycloak SSO ready for production Airflow?

The Keycloak auth manager manages users, roles, groups and permissions in Keycloak, but its provider docs mark it alpha and experimental, so weigh that risk. The FAB auth manager stores users and permissions in the Airflow database and documents SSO with OAuth2 providers. Only one auth manager is active at a time, and switching later is a heavy operation.

Our custom operators query the metadata database. What changes?

Airflow 3 task code cannot use Airflow's database sessions or models. Rework those operators to use the Task SDK or the REST API, which moves from /api/v1 to /api/v2. A database hook against the metadata database is documented only as a temporary workaround. DAGs built on standard operators move more easily between self-hosted and managed Airflow, but test representative DAGs in the target first.

Scope and handover for a self hosted Airflow deployment

DeployOpen plans the architecture with you and deploys Airflow 3 with the official Helm chart or on virtual machines. It sets up the metadata database, executor, DAG delivery, secrets backend and SSO through a production auth manager.

It also configures logging and monitoring, upgrades Airflow 2 installations, documents runbooks and provides ongoing support if you want it.

Scope depends on environments, DAG count, custom operators and plugins, executor choice, identity integration and how much Airflow 2 code needs rework.

Handover includes the component layout, executor and capacity settings, DAG delivery pipeline, auth manager and role mapping, connection and secrets inventory, metadata database restore result, Fernet key custody, alert routes and the version plan for Airflow and providers.

Sources and further reading

More on Apache Airflow

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.