# prefect-community

Cab Maddux

03/11/2020, 6:18 PM
Hi! When having the Kubernetes Agent trigger flows, I haven't been able to have the agent create my job with a custom k8s config yaml (it creates the job, just with the default k8s config yaml). Shouldn't I be able to use
flow.environment = KubernetesJobEnvironment(job_spec_file='...')
prior to
and have the k8s agent use my
to create the job? My job spec file is basically just the example here:
Actually it looks like the Kubernetes agent is creating a k8s job which is then creating another k8s job using my yaml to run the flow which seems kind of odd. Is there a way I can just have the k8s agent create a prefect job with a custom yaml?

Zachary Hughes

03/11/2020, 7:32 PM
Hi Cab, it looks like that's not currently possible. As it stands right now, we need to retrieve the flow from storage before we know what YAML the flow needs. We do have an issue open for this-- feel free to chime in with your use case and that could help us prioritize.