dagster-celery-k8s is a Dagster integration library that enables scalable, distributed execution of Dagster jobs using Celery as a task queue and Kubernetes for orchestrating Celery workers and individual step execution. It allows users to leverage Celery for concurrency control and task isolation, while Kubernetes handles the underlying infrastructure for distributed execution. The current version is 0.29.0, with releases typically synchronized with the Dagster core library's rapid development cadence.
pip install dagster-celery-k8sVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a simple Dagster job configured to use the `celery_k8s_job_executor`. To run this, you would deploy Dagster to Kubernetes using its Helm chart, configure `CeleryK8sRunLauncher` in your `dagster.yaml` with appropriate broker and backend URLs (e.g., Redis or RabbitMQ), and ensure Celery workers are running with the `dagster_celery_k8s.app` module. The `dagster.yaml` configures the Dagster instance to use the `CeleryK8sRunLauncher`, which delegates step execution to Celery tasks that, in turn, launch Kubernetes Jobs for each step.
Update Celery worker command to `celery -A dagster_celery_k8s.app worker -l info` or similar, depending on your specific Celery module.
Configure an appropriate persistent I/O manager (e.g., `s3_pickle_io_manager`, `gcs_pickle_io_manager`) in your Dagster job's resource definitions or instance configuration.
Ensure `runLauncher.type` is set to `CeleryK8sRunLauncher` in your Helm `values.yaml` file.
Verify that `broker` and `backend` URLs in `dagster.yaml` exactly correspond to the `CELERY_BROKER_URL` and `CELERY_RESULT_BACKEND` (or equivalent) settings used by your Celery workers.
Regularly consult the official Dagster changelog and upgrade guides before updating. Ensure your Python environment and other dependencies (like Pydantic) meet the latest combined requirements of your Dagster core and library versions.