Ingress and Ingress Controller
Ingress — Kubernetes object that defines rules for external traffic routing, load balancing, and SSL termination. Ingress Controller is a proxy server in a Managed Kubernetes cluster and routes traffic based on the rules that are defined in Ingress.
In Managed Kubernetes, the Ingress Controller is not pre-installed in the cluster; you must install it yourself. The choice of controller depends on the requirements of the applications hosted in the Managed Kubernetes cluster. For a list of possible controllers, see the Ingress Controllers instruction in the Kubernetes documentation.
We will look at installing a basic NGINX Ingress Controller through the control panel and using Helm chart.


Install NGINX Ingress Controller
Control panel
Helm
A load balancer of type Basic with redundancy and a public IP address will be created for the application. You cannot change the type in the created load balancer. If you want to change the load balancer type or its parameters, install the application using Helm-chart.
- Ensure that the pool has a quota of at least one public IP address allocated.
- In the dashboard, on the top menu, click Products and select Managed Kubernetes.
- Open the cluster page → Applications tab.
- In the Available for Installation block, click NGINX Ingress Controller.
- Check the price of the load balancer and public IP address.
- Click Install. A new load balancer of type Basic with redundancy with a public IP address will be created. The load balancer will appear in the control panel: in the top menu, click Products and select Cloud Servers → Balancers section → Balancers tab.
A load balancer with a public IP address will be automatically created with the Ingress Controller. By default, a load balancer of type Basic with redundancy is created, but you can choose the type of load balancer and configure other parameters for it — see the Configure a Load Balancer instructions for more information on load balancer parameters . The load balancer will be the entry point for accessing applications in the cluster, so you do not need to create an additional internal load balancer.
Without load balancer configuration
With load balancer configuration
-
Ensure that the pool has a quota of at least one public IP address allocated.
-
Add the
ingress-nginx
repository to Helm:helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
-
Install the Ingress Controller:
helm install ingress-nginx/ingress-nginx --generate-name
-
Check that the Ingress Controller is installed:
kubectl get pods
Ingress Controller information will appear in the response:
NAME READY STATUS RESTARTS AGE
ingress-nginx-1652172027-controller-6d765d1688-vr7ab 1/1 Running 0 51sA new load balancer will be created. It will appear in the Control Panel: in the top menu, click Products and select Cloud Servers → Balancers section → Balancers tab.
-
Ensure that the pool has a quota of at least one public IP address allocated.
-
Add the
ingress-nginx
repository to Helm:helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
-
Get the default values and save them to the
values.yaml
file:helm inspect values ingress-nginx/ingress-nginx > values.yaml
-
In the
annotations
block of thevalues.yaml
file, add the necessary parameters for the load balancer — for more information about load balancer parameters, see the Configure Load Balancer instruction.
Manifest fragment with annotations
block:
metadata:
name: loadbalancer-name
labels:
app: nginx
annotations:
service.beta.kubernetes.io/openstack-internal-load-balancer: "true"
-
Save your changes.
-
Install the Ingress Controller:
helm install ingress-nginx/ingress-nginx --generate-name -f values.yaml
-
Check that the Ingress Controller is installed:
kubectl get pods
Ingress Controller information will appear in the response:
NAME READY STATUS RESTARTS AGE
ingress-nginx-1652172027-controller-6d765d1688-vr7ab 1/1 Running 0 51sA new load balancer will be created. It will appear in the Control Panel: in the top menu, click Products and select Cloud Servers → Balancers section → Balancers tab.
Create Ingress
Manifesto example:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /testpath
pathType: Prefix
backend:
service:
name: test
port:
number: 80