You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the kubernetes python examples there is submission of jobs but nothing on stopping/deleting jobs that are queued or in progress. I can use the batchV1API instance in python and it works for jobs in progress but can't quite figure out how I stop jobs that are queued in kueue. I believe the jobs are submitted to kueue as workloads but is there an API to delete workloads?
namespace = 'default'
group_id = 'f4336081-0079-4403-b9f4-55b4f4cda948'
config = create_kubernetes_config(server, token, cert, key)
batch_api_inst = kubernetes.client.BatchV1Api(kubernetes.client.ApiClient(configuration=config))
ret = batch_api_inst.list_namespaced_job(
namespace,
label_selector=f"group_id={group_id}"
)
for j in ret.items:
batch_api_inst.delete_namespaced_job(j.metadata.name, namespace)
EDIT:
Looking in the kueue workloads definitions I have to change the "active" field in the workloads so looks like I have to use a different API call to modify the workload fields.
In the kubernetes python examples there is submission of jobs but nothing on stopping/deleting jobs that are queued or in progress. I can use the batchV1API instance in python and it works for jobs in progress but can't quite figure out how I stop jobs that are queued in kueue. I believe the jobs are submitted to kueue as workloads but is there an API to delete workloads?
https://kueue.sigs.k8s.io/docs/tasks/run/python_jobs/
EDIT:
Looking in the kueue workloads definitions I have to change the "active" field in the workloads so looks like I have to use a different API call to modify the workload fields.
https://kueue.sigs.k8s.io/docs/concepts/workload/
The text was updated successfully, but these errors were encountered: