Installing Ingress NGINX
Ingress NGINX
Getting started
-
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the
--folder-name
or--folder-id
parameter. -
Make sure that the security groups for the Managed Service for Kubernetes cluster and its node groups are configured correctly. If any rule is missing, add it.
Warning
The configuration of security groups determines the performance and availability of the cluster and the services and applications running in it.
Installation using Yandex Cloud Marketplace
-
Go to the folder page
and select Managed Service for Kubernetes. -
Click the name of the cluster you need and select the
Marketplace tab. -
Under Application available for installation, select Ingress NGINX and click Go to install.
-
Configure the application:
-
Namespace: Select a namespace for Ingress NGINX or create a new one.
-
Application name: Specify the app name.
-
Number of controller replicas: Set the number of Ingress controller replicas to improve fault tolerance. If only one replica is used, then, in case of its failure, the applications deployed using the Ingress controller will be unavailable.
The default value is
1
. -
Controller IP address: Specify a reserved IP address. You can reserve it using Yandex Virtual Private Cloud.
If you do not fill in the field, the Ingress controller will be assigned a dynamic IP address.
-
Traffic management policy: Select a policy for external traffic management. It matches the
externalTrafficPolicy
parameter in the Kubernetes specifications. The possible values are:-
Cluster: Traffic is routed to different Kubernetes nodes (default). As a result, traffic is distributed evenly; however, such an approach has some disadvantages:
- The package may come to one node's proxy and get rerouted to another node. Such behavior leads to delays in performing operations and sending packages.
- The pod that receives the package sees the IP address of the proxying node rather than the one of the client. As a result, the original IP address of the client is not preserved.
-
Local: Traffic is proxied and distributed between pods on the same node. The traffic is routed to the node via the port specified in the Kubernetes
Service
object of the LoadBalancer or NodePort type .The traffic comes to a specific node, so it is distributed unevenly between nodes; however, the client IP address is preserved.
For more information about policies for external traffic management, see the Kubernetes documentation
. -
-
-
Click Install.
-
Wait for the application to change its status to
Deployed
.
Installation using a Helm chart
-
Install Helm
v3.8.0 or higher. -
Install kubectl
and configure it to work with the created cluster. -
To install a Helm chart
with an NGINX Ingress controller, run this command:helm pull oci://cr.yandex/yc-marketplace/yandex-cloud/ingress-nginx/chart/ingress-nginx \ --version 4.10.0 \ --untar && \ helm install \ --namespace <namespace> \ --create-namespace \ ingress-nginx ./ingress-nginx/
Note
If you are using a Helm version below 3.8.0, append the
export HELM_EXPERIMENTAL_OCI=1 && \
string to the command to enable Open Container Initiative (OCI) support in the Helm client.
Use cases
- Creating a network load balancer using an NGINX Ingress controller
- Installing an NGINX Ingress controller with a Let's Encrypt® certificate manager
- Installing an NGINX Ingress controller with a Yandex Certificate Manager certificate