Julio Venegas
04/16/2021, 5:25 PMimport os
from prefect import task
@task
def get_env():
return os.environ.get("CURRENT_ENV")
with Flow(name="get-env") as flow:
env = get_env()
flow.register(project="get_env")
and I have “CURRENT_ENV” in my bash/zsh environment variables, and run the flow in with a LocalAgent, then it’s not necessary to pass any environment variables when I execute prefect agent local start
because the environment variable is already in the local system.
But if wanted to run the flow in a non-local environment, say in a Dask cluster in Kubernetes, then I would need to pass environment variables to prefect agent kubernetes start
?Kevin Kho
Julio Venegas
04/16/2021, 6:14 PMKevin Kho