Ingress

Ingress controllers are not pre-installed in Managed Kubernetes clusters. To create Ingress objects, you need to install any Ingress controller by yourself.

In addition to the Ingress controller application itself, a Service with the LoadBalancer type will be created (that is, a load balancer). The load balancer will be the entry point for external access to applications in the cluster. In this case, when installing the Ingress controller, there is no need to additionally create an internal load balancer.

Glossary

Term Definition
Ingress A mechanism that provides traffic routing on the application level (L7) and is provided from an Ingress controller
Ingress controller A proxy server deployed on a Managed Kubernetes cluster.
The specifics of choosing a controller depends on the requirements of applications hosted in a Managed Kubernetes cluster.
A list of existing Ingress controllers
Routing rules Rules for proxying incoming traffic from an external source to the services within a Managed Kubernetes cluster
Service A Managed Kubernetes service deployed on a cluster that provides network load balancing functionality and combines multiple pods.
The service has virtual IP addresses that are routed only on the cluster network
Pod A group of one or more containers, with shared resources for those containers.
Each pod of the Kubernetes cluster is assigned a unique IP address

Getting Ready to Install the Ingress Controller

Before installing the Ingress controller:

  1. Configure the environment and install the kubectl utility to manage the Managed Kubernetes cluster according to the Configuring the environment instructions.
  2. Install the Helm package manager.

Installing the Ingress Controller

Let’s consider installing a basic Nginx controller:

  1. Check which services already exist in the created Namespace:
kubectl --namespace default get services
  1. Add the ingress-nginx repository from the Kubeapps Hub:
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
  1. Install chart (supports configuration with the Ingress controller):
helm install ingress-nginx/ingress-nginx --version --generate-name
  1. Check the services again to make sure that ingress-nginx-controller is running:
kubectl --namespace default get services

The output will look as follows:

NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   nn.nn.n.n    <none>        443/TCP   22s

A new load balancer will appear on the Load balancers tab in the Cloud platform section of the Control panel.

Please note that you can install another Ingress controller according to the official instructions.

Example of a Manifest for Ingress

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