Samay Kapadia
01/19/2022, 1:13 PMdummy
runs on the aks-spot
node but prefect-job
runs on the aks-system
node (and I don’t want it running on the system node pool). Is there a way to configure tolerations and affinities for the prefect-job
pod?Anna Geller
Samay Kapadia
01/19/2022, 1:23 PMjob_template
and also pass in a RunNamedspacedJob
task. Let me try doing thatAnna Geller
flow.run_config = KubernetesRun(job_template_path="<s3://bucket/path/to/spec.yaml>")
Samay Kapadia
01/19/2022, 1:36 PMtolerations
and affinity
as named parameters to fix this. I’ll try to find a way around this in the meanwhile. Dankeschön from Berlin 🇩🇪.Anna Geller
Samay Kapadia
01/19/2022, 1:58 PMAnna Geller
Samay Kapadia
01/19/2022, 1:59 PMAnna Geller
Samay Kapadia
01/19/2022, 2:00 PMAnna Geller
job_template
then I cannot use the RunNamespacedJob
task.” - can you explain why?Samay Kapadia
01/19/2022, 2:22 PMcan you explain why?I actually looked into it, and it was because I didn’t specify a container name. When I fixed that it actually worked! This is the code snippet if anyone happens across this
run_config_job_template = {
"apiVersion": "batch/v1",
"kind": "Job",
"spec": {
"template": {
"spec": {
"containers": [
{
"name": "flow"
}
],
"affinity": {
"nodeAffinity": {
"requiredDuringSchedulingIgnoredDuringExecution": {
"nodeSelectorTerms": [
{
"matchExpressions": [
{
"key": "agentpool",
"operator": "In",
"values": ["spotd2as"],
}
]
}
]
}
}
},
"tolerations": [
{
"key": "<http://kubernetes.azure.com/scalesetpriority|kubernetes.azure.com/scalesetpriority>",
"operator": "Equal",
"value": "spot",
"effect": "NoSchedule",
}
]
}
}
}
}
k8s_run_config = KubernetesRun(job_template=run_config_job_template)
Anna Geller
Samay Kapadia
01/19/2022, 2:29 PMAnna Geller
Zanie
RunNamespacedJob
bit in your issue? I was quite confused by that part of your request.Samay Kapadia
01/19/2022, 4:24 PM