https://prefect.io logo
c

Clemens

12/09/2020, 3:01 PM
Hi Prefect Team, We have a prefect-server running on a Kubernetes cluster and just updated to
0.13.19.
. As environments are being deprecated I am trying to move the flows over to run_config setup. I am using the Docker storage and KubernetesRun for run_config. I noticed that the container that is built with
KubernetesRun()
is configured with:
Copy code
command: /bin/sh -c
command arguments: prefect execute flow-run
but when I inject a job spec file with`KubernetesRun(job_template_path="job_specs.yaml")` (as I need to to access the Kubernetes secrets that I need for the flow to run) only the
command arguments
are written by the prefect build and the
command
is left blank. That leads to the container failing with an
"executable not found"
A workaround is to specifically include the
command
section in the job specs file
command: ["/bin/sh", "-c"]
. That doesn’t seem to be expected behaviour, or am I missing something?
j

josh

12/09/2020, 3:14 PM
Hey @Clemens I believe this is actually intentional (although it could probably be improved) in the default job template it sets the
command
and I think that by using a custom job template it is assuming you have the command set. I’m going to open an issue on the repo to verify if that is intended behavior and if it is I think we might be able to make the experience better 🙂
@Marvin open “`executable not found` when not setting
command
in KubernetesRun job template”
c

Clemens

12/09/2020, 3:15 PM
I think a link in the docs to the default specs would already help a lot
j

josh

12/09/2020, 3:16 PM
Awesome this is actually already included in a new set of enhancements coming to the docs (for agent related stuff, perhaps it could be added to the KubernetesRun as well) https://github.com/PrefectHQ/prefect/pull/3786 that has an open PR now!
4 Views