﻿# Install Hostpath-provisioner

> [HTML Version](install-hostpath-provisioner.html)

Hostpath-provisioner is a Kubernetes component. It allows you to dynamically allocate storage for StatefulSets, which provides management for apps that require saving data between restarts.

Installation consists of three steps:

1. [Download the Helm chart and configuration file.](#download-helm-chart-and-config-file)

2. [Fill out the configuration file.](#fill-config-file)

3. [Install the hostpath-provisioner chart using Helm in a Kubernetes cluster.](#install-hostpath-provisioner-chart)

## Step 1: Download the Helm chart and configuration file

To install via the internet, obtain the \[OBJECT\]** **configuration file by executing the command:

````
helm repo add brix365 https://charts.brix365.com  
helm repo update  
helm show values brix365/hostpath-provisioner > values-hostpath-provisioner.yaml

````
**Obtaining the configuration file for installation in a closed loop without internet access**

1. On a computer with internet access, download the latest version archive of the **hostpath-provisioner** chart from the BRIX repository. To do this, execute the following command:

````
helm repo add brix365 https://charts.brix365.com  
helm repo update  
helm pull brix365/ hostpath-provisioner

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 hostpath-provisioner-X.Y.Z.tgz  
cp hostpath-provisioner/values.yaml values-hostpath-provisioner.yaml
````

## ````
Step 2: Fill out the configuration file

Fill out the \[OBJECT\]** **configuration file for the Hostpath-provisioner installation:

````
\# hostpath-provisioner settings  
hostpath-provisioner:  
\# selectors to run on specific nodes  
  nodeSelector: \{\}  
  affinity: \{\}  
  tolerations: \[\]

````
Filling in the connection parameters to the private registry for installation in a closed loop without internet access

1. Download the BRIX images and upload them to your local image registry. Read more about this in [Download BRIX images](downloadin-images-elma365.md).

2. Set the address and path for the \[OBJECT\] and \[OBJECT\] parameters.

3. Indicate the name of the secret with access rights to the private **registry** in the \[OBJECT\] parameter. The secret must be created manually and encrypted in Base64.

````
\# parameters for connecting to the private registry   
image:  
\# address and path for the private registry  
  repository: hub.brix365.com/docker/addons/rimusz/hostpath-provisioner  
  tag: "v0.2.5"
````

## ````
Step 3: Install the hostpath-provisioner chart using Helm in a Kubernetes cluster

Install the **hostpath-provisioner** chart in the \[OBJECT\].

For online installation:

````
helm upgrade --install hostpath-provisioner brix365/hostpath-provisioner -f values-hostpath-provisioner.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 hostpath-provisioner ./hostpath-provisioner -f values-hostpath-provisioner.yaml -n kube-system
````