title | linkTitle | date | weight | description |
---|---|---|---|---|
Run A Flux MiniCluster |
Flux MiniClusters |
2022-02-14 |
6 |
Run a Kueue scheduled Flux MiniCluster.
|
This page shows how to leverage Kueue's scheduling and resource management capabilities when running Flux Operator's MiniClusters.
This guide is for batch users that have a basic understanding of Kueue. For more information, see Kueue's overview.
Check administer cluster quotas for details on the initial cluster setup.
Check the Flux Operator installation guide.
Because a Flux MiniCluster runs as a batch/Job
, Kueue does not require extra components to manage a Flux MiniCluster.
However, take into consideration the following aspects:
The target local queue should be specified in the spec.jobLabels
section of the MiniCluster configuration.
jobLabels:
kueue.x-k8s.io/queue-name: user-queue
The resource needs of the workload can be configured in the spec.container[*].resources
sections of the MiniCluster configuration.
spec:
containers:
- image: <image>
resources:
requests:
cpu: 4
memory: "200Mi"
apiVersion: flux-framework.org/v1alpha1
kind: MiniCluster
metadata:
generateName: flux-sample-kueue-
spec:
size: 1
containers:
- image: ghcr.io/flux-framework/flux-restful-api:latest
command: sleep 10
resources:
requests:
cpu: 4
memory: "200Mi"
jobLabels:
kueue.x-k8s.io/queue-name: user-queue
For equivalent instructions for doing this in Python, see Run Python Jobs.