Ephemeral storage in Astro Private Cloud (APC) uses Kubernetes emptyDir volumes for temporary data that doesn’t need to persist across Pod restarts. This guide covers configuring ephemeral storage for Apache Airflow components including Dags, logs, and Redis.
Ephemeral storage (emptyDir volumes) provides:
APC runs every Airflow container with readOnlyRootFilesystem: true. To keep Airflow writable where it needs to be, the chart mounts emptyDir volumes at specific subpaths under /usr/local/airflow, such as /usr/local/airflow/logs, and at /usr/local/airflow/dags when using git-sync or the emptyDir Dag mode. Depending on log volume and Dag size, these volumes can consume significant ephemeral storage and exceed namespace limits. Factor this into your ephemeral storage sizing. For details on adding more writable directories, see Read-only root filesystem.
When using git-sync for Dag deployment, Dags are stored in an emptyDir volume.
Parameters:
sizeLimit: Maximum storage size (for example, 1Gi, 2Gi).medium: Storage medium.
"" (empty): Use node’s default storage (disk)."Memory": Use RAM (tmpfs) for faster access.Task logs can be stored in ephemeral storage when persistence is disabled.
Recommendations:
sizeLimit for high-volume task execution.medium: Memory for logs unless you have aggressive cleanup.When Redis persistence is disabled, it uses ephemeral storage.
For latency-sensitive workloads:
Memory-backed volumes (medium: Memory) count against container memory limits. If the volume grows too large, Pods may be OOMKilled. Size memory limits accordingly or use disk-backed storage.
Symptom: Pods evicted with DiskPressure or ephemeral storage exceeded.
Cause: emptyDir volume exceeded node’s ephemeral storage limits.
Solution:
sizeLimit in emptyDirConfig.Symptom: Pods OOMKilled when using medium: Memory.
Cause: Memory-backed emptyDir counts against container memory limits.
Solution:
sizeLimit on memory-backed volumes.Symptom: Dag processing takes too long.
Cause: Disk I/O latency on Dag volume.
Solution:
medium: Memory for Dag volume.sizeLimit.sizeLimit to prevent unbounded storage growth.