Hi guys. I managed to successfully deploy prefect ...
# prefect-kubernetes
t
Hi guys. I managed to successfully deploy prefect server and work pool to Kubernetes but I'm facing an issue which is a show stopper. All our clusters use dedicated node pools for different workloads just to protect them from each other. I configured nodeSelector and tolerations at the worker level and it works fine, but I cannot find any docs on configuring the same for actual jobs - which is crucial to properly manage huge workloads. Am I missing something?
k
hi tom, I've got you covered! I'll be online in a little bit to walk you through it
t
Great, waiting!
k
okay, I'm here!
the place to start is on the work pools page in the UI. for the kubernetes work pool whose jobs you want to customize, click the three dots -> edit
on the edit page, you'll see there's an advanced tab. click on that and take a look through it. you'll see a list of job variables and their types, as well as a templated k8s job manifest where those variables slot in
you can edit this template, adding new variables and modifying the job manifest to place those variables where they'll need to be. once you save, the new variables you added will be available as fields on the defaults tab, and can now be overridden per deployment as
job_variables
t
I don't see any variables for setting up nodeSelector and tolerations in base job template. Can I just add them there?
k
yep, you can add anything you want, just be sure it's valid as far as the k8s job spec is concerned
t
Ok, thank you, will try that in a minute
@Kevin Grismore thank you very much. That method worked like a charm!
🙌 1
k
woohoo!
t
ok, now scaling to millions of runs
😅 1