﻿# Install Ingress NGINX

> [HTML Version](install-ingress-nginx.html)

Ingress NGINX is a controller for managing incoming traffic in Kubernetes. It serves as a single access point to all services in the cluster and allows you to configure traffic routing according to various rules.

The installation consists of three steps:

1. [Install the Helm chart and configuration file.](#download-helm-chart-and-config-file)

2. [Fill out the configuration file.](#fill-config-file)

3. [Install the ingress-nginx chart using Helm in the Kubernetes cluster.](#install-ingress-nginx-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/ingress-nginx > values-ingress-nginx.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 **ingress-nginx** 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/ingress-nginx

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 ingress-nginx-X.Y.Z.tgz  
cp ingress-nginx/values.yaml values-ingress-nginx.yaml
````

## ````
Step 2: Fill out the configuration file

Fill out the \[OBJECT\] configuration file for the Ingress NGINX installation:

````
\# ingress-nginx settings  
ingress-nginx:  
  controller:  
\# Permission to use annotations \*-snippet  
    allowSnippetAnnotations: true  
\# Use DaemonSet or Deployment  
    kind: Deployment  
\# Nodes IP addresses on which the external controller service is available.  
    service:  
      externalIPs:  
        - 192.168.1.50  
\# selectors to run on specific nodes  
    tolerations: \[\]  
    affinity: \{\}  
    nodeSelector:  
      kubernetes.io/os: linux  
\# metrics collection connection parameters  
    metrics:  
      enabled: false  
      serviceMonitor:  
        enabled: false  
        scrapeInterval: 30

````
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.

````
\# Additional annotations for admission webhooks.  
admissionWebhooks:  
  patch:  
\# parameters for connecting to the private registry  
  image:  
\# address and path for the private registry  
     registry: hub.brix365.com/docker/addons  
     image: ingress-nginx/kube-webhook-certgen  
     tag: v1.4.3  
     digest: ""  
\# parameters for connecting to the private registry  
image:  
\# address and path for the private registry  
  registry: hub.brix365.com/docker/addons  
  image: ingress-nginx/controller  
  tag: "v1.11.2"  
  digest: ""  
  digestChroot: ""  
\# the secret with access rights to the private registry must be manually created, encrypted in Base64  
 # imagePullSecrets:  
 # - myRegistryKeySecretName
````

## ````
Step 3: Install the ingress-nginx chart using Helm in a Kubernetes cluster

Install the **ingress-nginx** chart in the \[OBJECT\].

For online installation:

````
helm upgrade --install ingress-nginx brix365/ingress-nginx -f values-ingress-nginx.yaml -n ingress-nginx --create-namespace

````
For offline installation without internet access, navigate to the directory with the downloaded chart and execute the command:

````
helm upgrade --install ingress-nginx ./ingress-nginx -f values-ingress-nginx.yaml -n ingress-nginx --create-namespace
````