For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
      • AstroFully-managed data operations, powered by Apache Airflow.
      • Astro Private CloudRun Airflow-as-a-service in your environment.
      • Professional ServicesExpert Airflow services for your enterprise's success.
    • Tools
      • Cosmos
      • Orbiter
      • CLI
      • AI SDK
      • Agents
      • Blueprint
      • UpdatesThe State of Airflow 2026See the insights from over 5,800 data practitioners in the full report. Download Now ➔
  • Customers
  • Docs
    • Insights
      • Blog
      • Webinars
      • Resource Library
      • Events
    • Education
      • Academy
      • What is Airflow?
  • Pricing
Get Started Free
    • Overview
      • Overview
        • Set up KubernetesPodOperator
        • Configure task-level resources
        • Mount a temporary directory
        • Run your Deployment's current Airflow image
        • Use secret environment variables
        • Use the @task.kubernetes decorator
      • Dag versioning
      • Airflow logs
      • DAG and task runs
      • Airflow REST API
    • Book Office Hours

Product

  • Platform Overview
  • Astro
  • Astro Observe
  • Astro Private Cloud
  • Security & Trust
  • Pricing

Tools & Services

  • Cosmos
  • Docs
  • Professional Services
  • Product Updates

Use Cases

  • AI Ops
  • Data Observability
  • ETL/ELT
  • ML Ops
  • Operational Analytics
  • All Use Cases

Industries

  • Financial Services
  • Gaming
  • Retail
  • Manufacturing
  • Healthcare
  • All Industries

Resources

  • Academy
  • eBooks & Guides
  • Blog
  • Webinars
  • Events
  • The Data Flowcast Podcast
  • All Resources

Airflow

  • What is Airflow
  • Airflow on Astro
  • Airflow 3.0
  • Airflow Upgrades
  • Airflow Use Cases
  • Airflow 2.x End of Life

Company

  • Our Story
  • Customers
  • Newsroom
  • Careers
  • Contact

Support

  • Knowledge Base
  • Status
  • Contact Support
GitHubYouTubeLinkedInx
  • Legal
  • Privacy
  • Terms of Service
  • Consent Preferences

  • Do Not Sell or Share My Personal information
  • Limit the Use Of My Sensitive Personal Information

Apache Airflow®, Airflow, and the Airflow logo are trademarks of the Apache Software Foundation. Copyright © Astronomer 2026. All rights reserved.

LogoLogo
On this page
  • Run the current Airflow image
  • Setup
Develop DAGsKubernetesPodOperator

Run your Deployment's current Airflow image

Edit this page
Built with

Run the current Airflow image

You can run your Deployment’s current Airflow image with the KubernetesPodOperator by using the environment variable, ASTRONOMER_AIRFLOW_IMAGE. This environment variable allows you to run KPO tasks using the same Runtime image that your Deployment uses, in a way that won’t be affected by underlying cluster infrastructure changes that might change the base image repository URL. The ASTRONOMER_AIRFLOW_IMAGE environment variable allows you to ensure that your Deployment retrieves the correct image URL.

Setup

1

Add current Airflow image configuration

Add the ASTRONOMER_AIRFLOW_IMAGE environment variable to your KPO configuration. For example:

1import os
2from airflow.configuration import conf
3from airflow.providers.cncf.kubernetes.operators.pod import KubernetesPodOperator
4from kubernetes.client import models as k8s
5KubernetesPodOperator(
6 namespace=conf.get("kubernetes", "NAMESPACE"),
7 image=os.getenv("ASTRONOMER_AIRFLOW_IMAGE"),
8 image_pull_secrets=[
9 k8s.V1LocalObjectReference("image-pull-secret"),
10 k8s.V1LocalObjectReference("per-dp-registry-pull-secret"),
11 ],
12 cmds=["<commands-for-image>"],
13 arguments=["<arguments-for-image>"],
14 labels={"<pod-label>": "<label-name>"},
15 name="<pod-name>",
16 task_id="<task-name>",
17 get_logs=True,
18 in_cluster=True,
19)