What is the best way to tell Kubernetes Agent to u...
# prefect-community
k
What is the best way to tell Kubernetes Agent to utilise only the nodes from a specific Node pool? We are running the agent on AKS in a separate namespace.
j
Hi @Klemen Strojan if you use something like the Kubernetes Agent’s
job_template_path
kwarg you can optionally provide a different default template for the jobs that the agent creates. If you follow a spec like the current default one you could copy it and add in your nodeSelector. Then provide the agent with the path to that updated yaml spec. Side note you could avoid this entirely if you want to test out a new experimental feature 🙂 There is a new feature called Run Configs which is a replacement for the current Environment pattern. With this you could set a KubernetesRun for your flow’s
.run_config
and in the KubernetesRun you are able to specify k8s specific configuration directly! Docs: https://docs.prefect.io/api/latest/run_configs.html#kubernetesrun
k
Hey @josh, thanks for your answer - I’ll check both options and let you know how it goes.