Skip to content

Commit 3e55dfe

Browse files
committed
Added doc for creating basic kueue resources
1 parent a9b314e commit 3e55dfe

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

Diff for: docs/setup-kueue.md

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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"]
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+
```
42+
### Adding GPU Resources
43+
If your workloads require GPU resources, it is crucial to include them in your Cluster Queue configuration. Here is how you can add a GPU resource to the existing setup:
44+
```yaml
45+
- name: "nvidia.com/gpu"
46+
nominalQuota: '2'
47+
```
48+
Include this line under the resources section for the respective flavor in your Cluster Queue configuration to allocate GPU quotas.
49+
50+
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/)
51+
52+
## 3. Local Queue (With Default Annotation):
53+
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.
54+
```yaml
55+
apiVersion: kueue.x-k8s.io/v1beta1
56+
kind: LocalQueue
57+
metadata:
58+
namespace: team-a
59+
name: team-a-queue
60+
annotations:
61+
kueue.x-k8s.io/default-queue: "true"
62+
spec:
63+
clusterQueue: cluster-queue
64+
```
65+
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/)
66+
67+
## Conclusion:
68+
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)