diff --git a/cmd/importer/README.md b/cmd/importer/README.md index e811c30df7..d869d638ea 100644 --- a/cmd/importer/README.md +++ b/cmd/importer/README.md @@ -2,7 +2,7 @@ A tool able to import existing pods into kueue. -## Cluster setup. +## Cluster setup The importer should run in a cluster having the Kueue CRDs defined and in which the `kueue-controller-manager` is not running or has the `pod` integration framework disabled. Check Kueue's [installation guide](https://kueue.sigs.k8s.io/docs/installation/) and [Run Plain Pods](https://kueue.sigs.k8s.io/docs/tasks/run_plain_pods/#before-you-begin) for details. @@ -11,6 +11,7 @@ For an import to succeed, all the involved Kueue objects (LocalQueues, ClusterQu ## Build From kueue source root run: + ```bash make importer-build @@ -21,6 +22,7 @@ make importer-build The command runs against the systems default kubectl configuration. Check the [kubectl documentation](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) to learn more about how to Configure Access to Multiple Clusters. ### Check + The importer will perform following checks: - At least one `namespace` is provided. @@ -61,6 +63,7 @@ It's done providing an yaml mapping file name as `--queuemapping-file` argument, - `skip: true` can be used to ignore the pods matching a rule. ### Import + After which, if `--dry-run=false` was specified, for each selected Pod the importer will: - Update the Pod's Kueue related labels. @@ -74,10 +77,13 @@ After which, if `--dry-run=false` was specified, for each selected Pod the impor ```bash ./bin/importer import -n ns1,ns2 --queuelabel=src.lbl --queuemapping=src-val=user-queue,src-val2=user-queue2 --dry-run=false ``` + Will import all the pods in namespace `ns1` or `ns2` having the label `src.lbl` set in LocalQueues `user-queue` or `user-queue2` depending on `src.lbl` value. - #### Advanced mapping +#### Advanced mapping + With mapping file: + ```yaml - match: labels: @@ -97,8 +103,7 @@ After which, if `--dry-run=false` was specified, for each selected Pod the impor Will import all the pods in namespace `ns1` or `ns2` having the label `src.lbl` set to `src-val` in LocalQueue `user-queue` regardless of their priorityClassName and those with `src.lbl==src-val2` ,`src2.lbl==src2-val` and `priorityClassName==p-class`in `user-queue2`. - -#### Run in cluster +### Run in cluster `cmd/importer/run-in-cluster` provides the necessary kustomize manifests needed to run the importer from within the cluster. @@ -117,6 +122,7 @@ Make the created image accessible by your cluster. Note: Importer images will be available in `gcr.io/k8s-staging-kueue/importer` soon. And run + ```bash (cd cmd/importer/run-in-cluster && kustomize edit set image importer=) ```