Skip to content

Instantly share code, notes, and snippets.

@jcrist
Created December 16, 2020 17:54
Show Gist options
  • Save jcrist/32ebc23ab1b4865fcf44fa9dda992d07 to your computer and use it in GitHub Desktop.
Save jcrist/32ebc23ab1b4865fcf44fa9dda992d07 to your computer and use it in GitHub Desktop.
Prefect Example using KubernetesRun
from prefect import Flow
from prefect.run_configs import KubernetesRun
from prefect.storage import Docker
with Flow("kubernetes-example") as flow:
# Add tasks to flow here...
# Run on Kubernetes with a custom resource configuration
flow.run_config = KubernetesRun(cpu_request=2, memory_request="4Gi")
# Store the flow in a docker image
flow.storage = Docker()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment