1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/kueue-configuring-localqueue-defaults.adoc
2025-10-01 17:34:03 +00:00

51 lines
1.7 KiB
Plaintext

// Module included in the following assemblies:
//
// * ai_workloads/kueue/configuring-quotas.adoc
:_mod-docs-content-type: PROCEDURE
[id="configuring-localqueue-defaults_{context}"]
= Configuring a default local queue
As a cluster administrator, you can improve quota enforcement in your cluster by managing all jobs in selected namespaces without needing to explicitly label each job. You can do this by creating a default local queue.
A default local queue serves as the local queue for newly created jobs that do not have the `kueue.x-k8s.io/queue-name` label. After you create a default local queue, any new jobs created in the namespace without a `kueue.x-k8s.io/queue-name` label automatically update to have the `kueue.x-k8s.io/queue-name: default` label.
[IMPORTANT]
====
Preexisting jobs in a namespace are not affected when you create a default local queue. If jobs already exist in the namespace before you create the default local queue, you must label those jobs explicitly to assign them to a queue.
====
.Prerequisites
include::snippets/prereqs-snippet-yaml-1.1.adoc[]
* You have created a `ClusterQueue` object.
.Procedure
. Create a `LocalQueue` object named `default` as a YAML file:
+
.Example of a default `LocalQueue` object
[source,yaml]
----
apiVersion: kueue.x-k8s.io/v1beta1
kind: LocalQueue
metadata:
namespace: team-namespace
name: default
spec:
clusterQueue: cluster-queue
----
. Apply the `LocalQueue` object by running the following command:
+
[source,terminal]
----
$ oc apply -f <filename>.yaml
----
.Verification
. Create a job in the same namespace as the default local queue.
. Observe that the job updates with the `kueue.x-k8s.io/queue-name: default` label.