Camilo Fernandez
05/31/2022, 7:59 AMAnna Geller
Camilo Fernandez
05/31/2022, 11:33 AMprefect register --project jaffle_shop -p flows/  supposed to be run in.
Since Prefect doesn't need to store the flow code in its server, then how would the Kubernetes agent have a reference to the code the first time?
The link you provided led me to this other page and choose the Script based cloud storage.
#my-flow.py
with Flow("kubernetes-flow", schedule=schedule, storage=S3(stored_as_script=True, key="kubernetes_flow.py", bucket="prefect-k8s-dev"),\
    run_config=KubernetesRun(image=<image-ulr:tag>)) as flow:
    print('hello-world')
   
flow.register(project_name="jaffle_shop")Camilo Fernandez
05/31/2022, 2:20 PM~/.prefect/config.toml I then checked it was getting the project I created in the UI with prefect get projects 
2. Create custom job template and passing it to the KubernetesRun Config with the parameter job_template_path and added it to the Helm values with agent.jobTemplateFilePath . I didn't confirmed if that was necessary though.
KubernetesRun(
    job_template_path="myjob.yaml",
    image="public.ecr.aws/123456/my-image:tag")
3.  Register the flow in my dev environment with prefect register --path my-flow.py --project my-project -l my-label and enjoyed the view of the jobs being created.Kevin Kho