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 the Ingress Controller Traefik using Helm chart.

Install Ingress Controller Traefik

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.

  1. Ensure that the pool has a quota of at least one public IP address allocated.

  2. Connect to the cluster.

  3. Install the Helm package manager.

  4. Add the traefik repository to Helm:

    helm repo add traefik https://traefik.github.io/charts
  5. Update the list of repositories:

    helm repo update
  6. Install the Ingress Controller:

    helm install traefik traefik/traefik
  7. Make sure the Ingress Controller is installed:

    kubectl get pods

    Ingress Controller information will appear in the response:

    NAME                       READY   STATUS    RESTARTS   AGE
    traefik-78d5c6f95b-2xk9p 1/1 Running 0 51s

    A new load balancer will be created. It will appear in the Control Panel: in the top menu, click Products and select Cloud ServersBalancers 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