New to Kestra?
Use blueprints to kickstart your first workflows.
Orchestrate ZenML machine learning pipelines with Kestra. Run ZenML steps in a container on a daily schedule, stream logs, and scale to cloud compute.
Trigger a ZenML machine learning pipeline directly from Kestra and let Kestra own the scheduling, execution, and observability around it. ZenML structures your ML code into reusable steps and pipelines, but it leaves orchestration, scheduling, retries, and cross-system dependencies to you. This blueprint closes that gap: it runs your ZenML pipeline inside a container on a daily schedule, streams the logs back into Kestra, and gives you a single place to operate model training alongside the rest of your data platform.
The flow has one task, run_zenml, of type io.kestra.plugin.scripts.python.Commands. It launches the zenmldocker/zenml-server container image and runs python zenml_flow.py. The pipeline script is supplied through inputFiles and defines a ZenML @pipeline with two @step functions: load_data returns a value and train_model consumes it. The task connects to your ZenML server through three environment variables: ZENML_STORE_API_KEY (sourced from a secret), ZENML_STORE_URL, and ZENML_STACK. A io.kestra.plugin.core.trigger.Schedule trigger fires the flow every day at 9 AM using the cron expression 0 9 * * *.
ZenML defines pipelines and steps, but it does not provide a full-featured scheduler, event triggers, or cross-tool dependency management on its own. With Kestra you get scheduled and event-driven triggers, automatic retries, execution history and lineage, and declarative YAML that keeps the pipeline definition in version control. You can chain the ZenML run to upstream data loads and downstream deployment or notification steps, all in one place, instead of stitching together ZenML's runtime with an external cron.
default).zenmldocker/zenml-server.ZENML_API_KEY: the ZenML service account API key, referenced as {{ secret('ZENML_API_KEY') }} and passed to the container as ZENML_STORE_API_KEY.zenmldocker/zenml-server with MySQL.ZENML_API_KEY secret.ZENML_STORE_URL and ZENML_STACK to match your environment.zenml_flow.py with your own pipeline, or move it to a namespace file with namespaceFiles.enabled: true and edit it in the Files editor.taskRunner (such as io.kestra.plugin.ee.aws.runner.Batch on AWS Fargate) to run the training on cloud compute instead of locally.