sigs.k8s.io/kueue@v0.6.2/site/content/en/docs/installation/_index.md (about)

     1  ---
     2  title: "Installation"
     3  linkTitle: "Installation"
     4  weight: 2
     5  description: >
     6    Installing Kueue to a Kubernetes Cluster
     7  ---
     8  
     9  <!-- toc -->
    10  - [Before you begin](#before-you-begin)
    11  - [Install a released version](#install-a-released-version)
    12    - [Add metrics scraping for prometheus-operator](#add-metrics-scraping-for-prometheus-operator)
    13    - [Uninstall](#uninstall)
    14  - [Install a custom-configured released version](#install-a-custom-configured-released-version)
    15  - [Install the latest development version](#install-the-latest-development-version)
    16    - [Uninstall](#uninstall-1)
    17  - [Build and install from source](#build-and-install-from-source)
    18    - [Add metrics scraping for prometheus-operator](#add-metrics-scraping-for-prometheus-operator-1)
    19    - [Uninstall](#uninstall-2)
    20  - [Install via Helm](#install-via-helm)
    21  - [Change the feature gates configuration](#change-the-feature-gates-configuration)
    22  
    23  <!-- /toc -->
    24  
    25  ## Before you begin
    26  
    27  Make sure the following conditions are met:
    28  
    29  - A Kubernetes cluster with version 1.21 or newer is running. Learn how to [install the Kubernetes tools](https://kubernetes.io/docs/tasks/tools/).
    30  - The `SuspendJob` [feature gate][feature_gate] is enabled. In Kubernetes 1.22 or newer, the feature gate is enabled by default.
    31  - (Optional) The `JobMutableNodeSchedulingDirectives` [feature gate][feature_gate] (available in Kubernetes 1.22 or newer) is enabled.
    32    In Kubernetes 1.23 or newer, the feature gate is enabled by default.
    33  - The kubectl command-line tool has communication with your cluster.
    34  
    35  Kueue publishes [metrics](/docs/reference/metrics) to monitor its operators.
    36  You can scrape these metrics with Prometheus.
    37  Use [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus)
    38  if you don't have your own monitoring system.
    39  
    40  The webhook server in kueue uses an internal cert management for provisioning certificates. If you want to use
    41    a third-party one, e.g. [cert-manager](https://github.com/cert-manager/cert-manager), follow these steps:
    42  
    43    1. Set `internalCertManagement.enable` to `false` in [config file](#install-a-custom-configured-released-version).
    44    2. Comment out the `internalcert` folder in `config/default/kustomization.yaml`.
    45    3. Enable `cert-manager` in `config/default/kustomization.yaml` and uncomment all sections with 'CERTMANAGER'.
    46  
    47  [feature_gate]: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
    48  
    49  ## Install a released version
    50  
    51  To install a released version of Kueue in your cluster, run the following command:
    52  
    53  ```shell
    54  VERSION={{< param "version" >}}
    55  kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/download/$VERSION/manifests.yaml
    56  ```
    57  
    58  ### Add metrics scraping for prometheus-operator
    59  
    60  > _Available in Kueue v0.2.1 and later_
    61  
    62  To allow [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator)
    63  to scrape metrics from kueue components, run the following command:
    64  
    65  ```shell
    66  kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/download/$VERSION/prometheus.yaml
    67  ```
    68  
    69  ### Uninstall
    70  
    71  To uninstall a released version of Kueue from your cluster, run the following command:
    72  
    73  ```shell
    74  VERSION={{< param "version" >}}
    75  kubectl delete -f https://github.com/kubernetes-sigs/kueue/releases/download/$VERSION/manifests.yaml
    76  ```
    77  
    78  ## Install a custom-configured released version
    79  
    80  To install a custom-configured released version of Kueue in your cluster, execute the following steps:
    81  
    82  1. Download the release's `manifests.yaml` file:
    83  
    84      ```shell
    85      VERSION={{< param "version" >}}
    86      wget https://github.com/kubernetes-sigs/kueue/releases/download/$VERSION/manifests.yaml
    87      ```
    88  
    89  2. With an editor of your preference, open `manifests.yaml`.
    90  3. In the `kueue-manager-config` ConfigMap manifest, edit the
    91  `controller_manager_config.yaml` data entry. The entry represents
    92  the default Kueue Configuration
    93  struct ([v1beta1@main](https://pkg.go.dev/sigs.k8s.io/kueue@main/apis/config/v1beta1#Configuration)).
    94  The contents of the ConfigMap are similar to the following:
    95  
    96  > __The `namespace` and `internalCertManagement` fields are available in Kueue v0.3.0 and later__
    97  
    98  ```yaml
    99  apiVersion: v1
   100  kind: ConfigMap
   101  metadata:
   102    name: kueue-manager-config
   103    namespace: kueue-system
   104  data:
   105    controller_manager_config.yaml: |
   106      apiVersion: config.kueue.x-k8s.io/v1beta1
   107      kind: Configuration
   108      namespace: kueue-system
   109      health:
   110        healthProbeBindAddress: :8081
   111      metrics:
   112        bindAddress: :8080
   113        # enableClusterQueueResources: true
   114      webhook:
   115        port: 9443
   116      manageJobsWithoutQueueName: true
   117      internalCertManagement:
   118        enable: true
   119        webhookServiceName: kueue-webhook-service
   120        webhookSecretName: kueue-webhook-server-cert
   121      waitForPodsReady:
   122        enable: true
   123        timeout: 10m
   124      # pprofBindAddress: :8082
   125      integrations:
   126        frameworks:
   127        - "batch/job"
   128      # - "kubeflow.org/mpijob"
   129      # - "ray.io/rayjob"
   130  ```
   131  
   132  __The `namespace`, `waitForPodsReady`, and `internalCertManagement` fields are available in Kueue v0.3.0 and later__
   133  
   134  > **Note**
   135  > See [Sequential Admission with Ready Pods](/docs/tasks/setup_sequential_admission) to learn
   136  more about using `waitForPodsReady` for Kueue.
   137  
   138  4. Apply the customized manifests to the cluster:
   139  
   140  ```shell
   141  kubectl apply --server-side -f manifests.yaml
   142  ```
   143  
   144  ## Install the latest development version
   145  
   146  To install the latest development version of Kueue in your cluster, run the
   147  following command:
   148  
   149  ```shell
   150  kubectl apply --server-side -k "github.com/kubernetes-sigs/kueue/config/default?ref=main"
   151  ```
   152  
   153  The controller runs in the `kueue-system` namespace.
   154  
   155  ### Uninstall
   156  
   157  To uninstall Kueue, run the following command:
   158  
   159  ```shell
   160  kubectl delete -k "github.com/kubernetes-sigs/kueue/config/default?ref=main"
   161  ```
   162  
   163  ## Build and install from source
   164  
   165  To build Kueue from source and install Kueue in your cluster, run the following
   166  commands:
   167  
   168  ```sh
   169  git clone https://github.com/kubernetes-sigs/kueue.git
   170  cd kueue
   171  IMAGE_REGISTRY=registry.example.com/my-user make image-local-push deploy
   172  ```
   173  
   174  ### Add metrics scraping for prometheus-operator
   175  
   176  > _Available in Kueue v0.2.0 and later_
   177  
   178  To allow [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator)
   179  to scrape metrics from kueue components, run the following command:
   180  
   181  ```shell
   182  make prometheus
   183  ```
   184  
   185  ### Uninstall
   186  
   187  To uninstall Kueue, run the following command:
   188  
   189  ```sh
   190  make undeploy
   191  ```
   192  ## Install via Helm
   193  
   194  To install and configure Kueue with [Helm](https://helm.sh/), follow the [instructions](https://github.com/kubernetes-sigs/kueue/blob/main/charts/kueue/README.md).
   195  
   196  ## Change the feature gates configuration
   197  
   198  Kueue uses a similar mechanism to configure features as described in [Kubernetes Feature Gates](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates).
   199  
   200  In order to change the default of a feature, you need to edit the `kueue-controller-manager` deployment within the kueue installation namespace and change the `manager` container arguments to include 
   201  
   202  ```
   203  --feature-gates=...,<FeatureName>=<true|false>
   204  ```
   205  
   206  For example, to enable `PartialAdmission`, you should change the manager deployment as follows:
   207  
   208  ```diff
   209  kind: Deployment
   210  ...
   211  spec:
   212    ...
   213    template:
   214      ...
   215      spec:
   216        containers:
   217        - name: manager
   218          args:
   219          - --config=/controller_manager_config.yaml
   220          - --zap-log-level=2
   221  +       - --feature-gates=PartialAdmission=true
   222  ```
   223  
   224  The currently supported features are:
   225  
   226  | Feature | Default | Stage | Since | Until |
   227  |---------|---------|-------|-------|-------|
   228  | `FlavorFungibility` | `true` | beta | 0.5 |  |
   229  | `MultiKueue` | `false` | Alpha | 0.6 | |
   230  | `PartialAdmission` | `false` | Alpha | 0.4 | 0.4 |
   231  | `PartialAdmission` | `true` | Beta | 0.5 |  |
   232  | `ProvisioningACC` | `false` | Alpha | 0.5 |  |
   233  | `QueueVisibility` | `false` | Alpha | 0.5 |  |
   234  | `VisibilityOnDemand` | `false` | Alpha | 0.6 | |
   235  | `PrioritySortingWithinCohort` | `true` | Beta | 0.6 |  |
   236  | `LendingLimit` | `false` | Alpha | 0.6 | |
   237  
   238  ## What's next
   239  
   240  - Read the [API reference](/docs/reference/kueue-config.v1beta1/#Configuration) for  `Configuration`