﻿# Install Descheduler

> [HTML Version](install-descheduler.html)

The Descheduler is used for redistributing workloads among the nodes of a Kubernetes cluster by evicting Pods. The Descheduler periodically checks the placement of Pods in the Kubernetes cluster and evicts them to less loaded nodes using a set of pre-configured strategies. For Descheduler to operate, a minimum of three nodes in the Kubernetes cluster is required.

````
начало внимание 

````
For a Kubernetes clusters deployed on the Deckhouse platform, the installation of Descheduler is not required. In this case, use the built-in [module](https://deckhouse.io/documentation/v1/modules/400-descheduler/). 

````
конец внимание 

````
The installation consists of three steps:

1. [Download the Helm chart and the configuration file](#download-helm-chart-and-config-file). 

2. [Fill out the configuration file](#fill-config-file). 

3. [Install the Descheduler chart using helm in the Kubernetes cluster](#install-chart-descheduler).

## Step 1: Download the Helm chart and the configuration file

To install via the internet, obtain the configuration file \[OBJECT\] by executing the command:

````
helm repo add brix365 https://charts.brix365.com  
helm repo update  
helm show values brix365/descheduler > values-descheduler.yaml

````
Obtaining the configuration file for installation in a closed loop without internet access

1. On a computer with internet access, download the BRIX images and upload them to your local image registry by executing the following command:

````
helm repo add brix365 https://charts.brix365.com  
helm repo update  
helm pull brix365/descheduler

````
For more details, see [Download BRIX images](downloadin-images-elma365.md).

2. Copy the downloaded chart archive \[OBJECT\] onto the server where the installation will take place.

3. Unpack this chart and copy the default configuration file \[OBJECT\] to \[OBJECT\]: 

````
tar -xf descheduler-X.Y.Z.tgz  
cp descheduler/values.yaml values-descheduler.yaml
````

## ````
Step 2: Fill out the configuration file

Fill out the configuration file \[OBJECT\] for the Descheduler installation.

For this purpose, configure the frequency of the Descheduler by setting the desired interval in minutes for the parameter \[OBJECT\]. The default interval is set to 2 minutes. The Descheduler is installed in \[OBJECT\]. This \[OBJECT\] is set by default.

````
\# Descheduler settings (at least 3 nodes in the cluster are required)  
descheduler:  
  # override service name  
  fullnameOverride: descheduler  
  # run as a CronJob or Deployment  
  kind: Deployment  
  # namespace for descheduler (must be created before installation with kubectl create ns kube-system)  
  namespace: kube-system  
  # sets the time between consecutive executions of descheduler  
  deschedulingInterval: 2m  
  # selectors to run on specific nodes  
  nodeSelector: \{\}  
...

````
Filling in the connection parameters to the private registry for installation in a closed loop without internet access

  
To connect to a private registry, you need to:

1. Download the BRIX images and upload them to your local image registry. Read more about this  [Download BRIX images](downloadin-images-elma365.md).

2. Set the address and path for the parameter \[OBJECT\].

3. Indicate the name of the secret with access rights to the private registry in the parameter \[OBJECT\]. The secret must be created manually and encrypted in Base64.

````
\# Descheduler settings (at least 3 nodes in the cluster are required)  
descheduler:  
...  
  # Connection parameters to the private registry  
  image:  
    # address and path for the private registry  
    repository: registry.example.com/descheduler/descheduler  
  # the secret with access rights to the private registry must be manually created, encrypted in Base64  
  imagePullSecrets:  
    - myRegistryKeySecretName

````
Where the repository** **format is as follows:

- Addres is \[OBJECT\].

- Path is \[OBJECT\]. 

## Step 3: Install the Descheduler chart using helm in the Kubernetes cluster 

Install the Descheduler chart in \[OBJECT\].

For online installation:

````
helm upgrade --install descheduler brix365/descheduler -f values-descheduler.yaml -n kube-system 

````
For offline installation without internet access, navigate to the directory with the downloaded chart and execute the command:

````
helm upgrade --install descheduler ./descheduler -f values-descheduler.yaml -n kube-system

## ````
Delete the Descheduler chart using helm in the Kubernetes cluster

To delete the Descheduler chart in \[OBJECT\], execute the command:

````
helm uninstall descheduler -n kube-system 
````