Thread
#prefect-server
    Saurabh Indoria

    Saurabh Indoria

    9 months ago
    Hi, I was looking at custom job templates for Kubernetes run. In the documentation https://docs.prefect.io/orchestration/agents/kubernetes.html#custom-job-template, the link given for the default template is https://github.com/PrefectHQ/prefect/blob/master/src/prefect/agent/kubernetes/job_template.yaml but https://github.com/PrefectHQ/prefect/blob/master/src/prefect/agent/kubernetes/job_spec.yaml this file appears to be more like the default file. 1. Can you please confirm which is the default file used by Prefect? 2. If I just have to modify the CPU limits, should I copy
    job_spec.yaml
    and modify the CPU section leaving the rest as it is?
    Kevin Kho

    Kevin Kho

    9 months ago
    Hi @Saurabh Indoria, you can see it here that the agent pulls the first file. Before Prefect 0.14.0, there were no RunConfigs, just Environments. Environments are now deprecated for RunConfigs, but left in the codebase for backward compatibility. The
    job_spec.yaml
    is used by the Environment code path here , so only relevant if you are below Prefect 0.14.0 Honestly, the easiest way to edit the CPU and Mem limits would be through the
    KubernetesRun
    defined in your Flow. There is an example in this section. I say this is easier because if you modify the
    job_template
    , it still needs to be in a place that is accessible by your agent, meaning it has to be stored in somewhere like S3 or in the container image.
    Saurabh Indoria

    Saurabh Indoria

    9 months ago
    Hi @Kevin Kho, Thanks for the detailed and quick response! I totally missed the KubernetesRun config option to increase CPU and memory... you saved me a lot of hours, thanks mate!