Bradley Hurley

12/28/2021, 8:58 PM
Hi All - I am working on a proof of concept to run Prefect in K8 via
for local development alongside
. Ideally, this would allow us to port our existing prefect deployment to k8

Kevin Kho

12/28/2021, 9:34 PM
Hi @Bradley Hurley, this setup looks like it’s not too far off from working. See this thread. Would you be able to move some of the code to the thread for me so we don’t crowd the main channel?

Bradley Hurley

12/28/2021, 9:35 PM
Thanks! - This looks super helpful!
Original Posting (Moved to thread) Helm
helm repo add localstack-charts <https://localstack.github.io/helm-charts>
helm repo add prefecthq <https://prefecthq.github.io/server/>
helm repo update

helm install aws localstack-charts/localstack
helm list -o json

helm install --set prefectVersionTag=0.15.11-python3.9  --set serverVersionTag=core-0.15.11 --set agent.enabled=true  prefect prefecthq/prefect-server

prefect backend server
kubectl port-forward service/prefect-ui 8080
kubectl port-forward service/prefect-apollo 4200 

prefect server create-tenant --name default --slug default
prefect create project 'default'
Register Flow -
python -m flow
from prefect import Flow, task

@task(name="hello", log_stdout=True)
def hello():
    print("Attempting To Say Hello")

def create_flow() -> Flow:
    with Flow(name="say-hello") as flow:
        hello_called = hello()
    return flow

if __name__ == "__main__":
The flow fails:
Pod prefect-job-4917beb4--1-ndkbd failed.
	Container 'flow' state: terminated
		Exit Code:: 1
		Reason: Error
Failed to load and execute Flow's environment: ModuleNotFoundError("No module named '/Users/bradley/'")
I've done a fair bit of poking around, but can't seem to get back on track.