The Orion project continues its steady march to becoming the greatest workflow orchestration engine ever. This week, it is one step closer to production-ready with Kubernetes integration.
The new Prefect CLI command
prefect orion kubernetes-manifest will automatically generate a Kubernetes manifest for:
- Orion service and its underlying REST API,
- Orion UI,
- Orion agent,
- a Kubernetes Role and RoleBinding with all necessary permissions.
from prefect import flow from prefect.deployments import DeploymentSpec from prefect.flow_runners import KubernetesFlowRunner @flow def test_flow(): print("Hello from Kubernetes!") DeploymentSpec( flow=test_flow, name="k8s_flow", flow_runner=KubernetesFlowRunner(stream_output=True), )
If you’re running Orion in Kubernetes, you don’t need to configure any networking. When the agent runs your deployment, it will create a Kubernetes job, which will start a pod running your flow.
To learn more, check out: