Skip to content

Commit 4593387

Browse files
Ygnasopenshift-merge-bot[bot]
authored andcommitted
Added doc for creating basic kueue resources
1 parent f836653 commit 4593387

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

Diff for: docs/setup-kueue.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Basic Kueue Resources configuration
2+
3+
## Introduction:
4+
5+
This document is designed for administrators who have Kueue installed on their cluster. We will walk through the process of setting up essential Kueue resources, namely Cluster Queue, Resource Flavor, and Local Queue.
6+
7+
## 1. Resource Flavor:
8+
Resource Flavors allow the cluster admin to define different types of resources with specific characteristics, such as CPU, memory, GPU, etc. These can then be assigned to workloads to ensure they are executed on appropriate resources.
9+
10+
The YAML configuration provided below creates an empty Resource Flavor named default-flavor. It serves as a starting point and does not specify any detailed resource characteristics.
11+
```yaml
12+
apiVersion: kueue.x-k8s.io/v1beta1
13+
kind: ResourceFlavor
14+
metadata:
15+
name: default-flavor
16+
```
17+
For more detailed information on Resource Flavor configuration options, refer to the Kueue documentation: [Resource Flavor Configuration](https://kueue.sigs.k8s.io/docs/concepts/resource_flavor/)
18+
19+
## 2. Cluster Queue:
20+
A Cluster Queue represents a shared queue across the entire cluster. It allows the cluster admin to define global settings for workload prioritization and resource allocation.
21+
22+
When setting up a Cluster Queue in Kueue, it's crucial that the resource specifications match the actual capacities and operational requirements of your cluster. The example provided outlines a basic setup; however, each cluster may have different resource availabilities and needs.
23+
```yaml
24+
apiVersion: kueue.x-k8s.io/v1beta1
25+
kind: ClusterQueue
26+
metadata:
27+
name: "cluster-queue"
28+
spec:
29+
namespaceSelector: {} # match all.
30+
resourceGroups:
31+
- coveredResources: ["cpu", "memory", "pods", "nvidia.com/gpu"]
32+
flavors:
33+
- name: "default-flavor"
34+
resources:
35+
- name: "cpu"
36+
nominalQuota: 9
37+
- name: "memory"
38+
nominalQuota: 36Gi
39+
- name: "pods"
40+
nominalQuota: 5
41+
- name: "nvidia.com/gpu"
42+
nominalQuota: '0'
43+
```
44+
45+
For more detailed information on Cluster Queue configuration options, refer to the Kueue documentation: [Cluster Queue Configuration](https://kueue.sigs.k8s.io/docs/concepts/cluster_queue/)
46+
47+
## 3. Local Queue (With Default Annotation):
48+
A Local Queue represents a queue associated with a specific namespace within the cluster. It allows namespace-level control over workload prioritization and resource allocation.
49+
```yaml
50+
apiVersion: kueue.x-k8s.io/v1beta1
51+
kind: LocalQueue
52+
metadata:
53+
namespace: team-a
54+
name: team-a-queue
55+
annotations:
56+
kueue.x-k8s.io/default-queue: "true"
57+
spec:
58+
clusterQueue: cluster-queue
59+
```
60+
61+
In the LocalQueue configuration provided above, the annotations field specifies `kueue.x-k8s.io/default-queue: "true"`. This annotation indicates that the team-a-queue is designated as the default queue for the team-a namespace. When this is set, any workloads submitted to the team-a namespace without explicitly specifying a queue will automatically be routed to the team-a-queue.
62+
63+
For more detailed information on Local Queue configuration options, refer to the Kueue documentation: [Local Queue Configuration](https://kueue.sigs.k8s.io/docs/concepts/local_queue/)
64+
65+
## Conclusion:
66+
By following the steps outlined in this document, the cluster admin can successfully create the basic Kueue resources necessary for workload management in the cluster. For more advanced configurations and features, please refer to the comprehensive [Kueue documentation](https://kueue.sigs.k8s.io/docs/concepts/).

0 commit comments

Comments
 (0)