// Module included in the following assemblies:
//
// * ai_workloads/kueue/install-kueue.adoc
// * ai_workloads/kueue/install-disconnected.adoc

:_mod-docs-content-type: PROCEDURE
[id="create-kueue-cr_{context}"]
= Creating a Kueue custom resource

[role="_abstract"]
After you have installed the {kueue-op}, you must create a `Kueue` custom resource (CR) to configure your installation.

.Prerequisites

include::snippets/prereqs-snippet-console.adoc[]

.Procedure

. In the {product-title} web console, click *Operators* -> *Installed Operators*.
. In the *Provided APIs* table column, click *Kueue*. This takes you to the *Kueue* tab of the *Operator details* page.
. Click *Create Kueue*. This takes you to the *Create Kueue* YAML view.
. Enter the details for your `Kueue` CR.
+
.Example `Kueue` CR
[source,yaml]
----
apiVersion: kueue.openshift.io/v1
kind: Kueue
metadata:
  labels:
    app.kubernetes.io/name: kueue-operator
    app.kubernetes.io/managed-by: kustomize
  name: cluster
  namespace: openshift-kueue-operator
spec:
  managementState: Managed
  config:
    integrations:
      frameworks:
      - BatchJob
    preemption:
      preemptionPolicy: Classical
# ...
----
+
where:

`metadata.name`:: Specifies the name of the `Kueue` CR. The value must be `cluster`.
`spec.config.integrations.frameworks`:: Specifies the workload types to configure for {kueue-name}. The default configuration is `BatchJob`. Additional types are `Pod`, `Deployment`, and `StatefulSet`.
`spec.config.preemption.preemptionPolicy`:: Specifies the preemption policy for {kueue-name}. Set the value to `FairSharing` to configure fair sharing. The default value is `Classical`. This value is optional.

. Click *Create*.

.Verification

* After you create the `Kueue` CR, the web console brings you to the *Operator details* page, where you can see the CR in the list of *Kueues*.
* Optional: If you have the {oc-first} installed, you can run the following command and observe the output to confirm that your `Kueue` CR has been created successfully:
+
[source,terminal]
----
$ oc get kueue
----
+
.Example output
[source,terminal]
----
NAME      	AGE
cluster   	4m
----
