Skip to main content

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

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.

  1. Ensure that the pool has a quota of at least one public IP address allocated.
  2. In the dashboard, on the top menu, click Products and select Managed Kubernetes.
  3. Open the cluster page → Applications tab.
  4. In the Available for Installation block, click NGINX Ingress Controller.
  5. Check the price of the load balancer and public IP address.
  6. 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.

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