The Simplest Way to Make Airflow and Rook Work Like They Should
Teams use airflow and rook to schedule data jobs and manage storage inside Kubernetes. Airflow runs the tasks on a timer, while Rook turns raw disks into shared storage. This pair helps data teams run big jobs without buying outside cloud storage. Airflow workers start up, read raw files from Rook, and write back clean results. Both tools run inside the same cluster, which keeps data transfer fast and local. Still, teams must set up clear rules so tasks only touch the right folders. How airfl
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams use airflow and rook to schedule data jobs and manage storage inside Kubernetes. Airflow runs the tasks on a timer, while Rook turns raw disks into shared storage.
This pair helps data teams run big jobs without buying outside cloud storage. Airflow workers start up, read raw files from Rook, and write back clean results. Both tools run inside the same cluster, which keeps data transfer fast and local. Still, teams must set up clear rules so tasks only touch the right folders.
How airflow and rook share data and roles
Airflow uses a scheduler to start worker pods when a job needs to run. Each worker pod needs a place to read input files and save task logs. Rook runs Ceph inside Kubernetes to give these pods block, file, or object storage. When a worker starts, Kubernetes mounts a Rook volume or passes audit storage keys.
Permissions flow through Kubernetes service accounts and storage user keys. An Airflow task uses a service account to ask Kubernetes for a storage claim. For object storage, the task uses an access key that Rook creates and owns. The worker reads the data, runs the code, and writes the output to Rook. Once the task ends, the worker pod stops, but the data stays safe on disk.
Common mistakes when linking tasks to storage
Many teams give every Airflow worker the exact same storage key or role. This shared key often has full read and write rights across all buckets. If one bad task runs, it can wipe out files for another team. Shared keys also make it hard to see which job changed a file.
Another common risk comes from leaving task logs and raw data in one bucket. Sensitive fields like emails or card numbers can sit next to basic run logs. If a team member checks a failed job, they might pull private data by mistake. Unlogged reads and wide network paths make these leaks hard to spot and fix.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Scoping storage roles and network paths
To fix this, give each Airflow job group its own Kubernetes service account. Map each service account to a single Rook bucket or volume with tight rules. Read-only jobs should never get keys that allow file writes or deletes. Keep task logs in a dedicated bucket away from raw customer data.
Use Kubernetes network rules to limit which pods can talk to Rook storage nodes. Only active Airflow worker pods and storage admins should reach the Rook storage network. Rotate storage keys on a set schedule and drop old keys right away. Check storage logs often to see which worker pod read or wrote each file. Masking tools can also rewrite emails or phone numbers in query results before storage.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Why do teams run Rook with Airflow in Kubernetes?
Rook gives Airflow pods fast local storage for task logs and big data files. Teams can run both tools in one cluster without paying for outside cloud buckets.
Should Airflow use block, file, or object storage from Rook?
Use shared file storage when many workers need to read the same workflow files. Use object storage for big data outputs and long-term task logs.
How can teams stop an Airflow task from reading the wrong Rook bucket?
Give each job its own Kubernetes service account and a scoped storage key. Never share one admin storage key across all worker pods in the cluster.
Related guides
In this post