VK Cloud logo
Updated at April 24, 2024   07:11 AM

Ingress NGINX

Installing the addon

Several installation options are available for the addon.

Take into account the total maximum system requirements of addons that will be placed on groups of worker nodes. If necessary, perform manual scaling for groups of worker nodes or configure automatic scaling before install.

  1. Install the addon:

    1. Go to VK Cloud personal account.

    2. Select project, where the cluster will be placed.

    3. Go to ContainersKubernetes clusters.

    4. Click on the name of the desired cluster.

    5. Go to Addons tab.

    6. If there are already installed addons in the cluster, click on the Add addon button.

    7. Click the Install addon button on the ingress-nginx addon card.

    8. Edit if necessary:

      • application name;

      • the name of the namespace where the addon will be installed;

      • addon settings code.

    9. Click the Install addon button.

      The installation of the addon in the cluster will begin. This process can take a long time.

  2. Get the IP address of the load balancer.

Editing the addon setup code during installation

Changing the load balancer type for the Ingress controller

When installing an addon with default parameters, a load balancer with a floating IP address is created, and the Ingress controller will be accessible from the Internet.

To prevent the Ingress controller from being accessible from the Internet, specify an annotation according to which an internal load balancer will be created:

---service:  annotations:    {      "loadbalancer.openstack.org/proxy-protocol": "true",      "service.beta.kubernetes.io/openstack-internal-load-balancer": "true",    }

After editing the addon code continue installing the addon.

Prohibition of deleting an Ingress controller node by the Autoscaler module

The Autoscaler module automatically scales the cluster: it adds nodes when the load increases, and removes when it decreases. To prevent a module from deleting the node on which the add-on is running, you need to specify a ban on deletion in the pod annotation:

controller:  podAnnotations:    cluster-autoscaler.kubernetes.io/safe-to-evict: "false"

After editing the addon code continue installing the addon.

Getting the IP address of the load balancer

  1. Connect to the cluster using Kubernetes Dashboard.

  2. In the drop-down list next to the left of the search bar, select a namespace ingress-nginx.

  3. Go to Service → Services.

  4. Find in the list of services ingress-nginx-controller type LoadBalancer.

    The External Endpoints column will display the floating IP address assigned to the load balancer.