Ingress Controller for Managed Service for Kubernetes
Application Load Balancer provides a tool for creating and managing load balancers in Yandex Managed Service for Kubernetes clusters: Application Load Balancer Ingress Controller.
After installing the controller, you can use it to create an Ingress object that will be responsible for receiving incoming traffic. Based on the Ingress configuration, an L7 load balancer is deployed automatically with the necessary target groups, backend groups, HTTP routers, and listeners.
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: alb-demo-tls spec: tls: - hosts: - <domain name> secretName: yc-certmgr-cert-id-<certificate ID from the Certificate Manager> rules: - host: <domain name> http: paths: - path: /app1 pathType: Prefix backend: service: name: alb-demo-1 port: number: 80 - path: /app2 pathType: Prefix backend: service: name: alb-demo-2 port: number: 80 - pathType: Prefix path: "/" backend: service: name: alb-demo-2 port: number: 80
Using this configuration, the controller creates a load balancer with three listeners that receive traffic on port 80. Since the configuration specifies the domain name and certificate from the Certificate Manager, HTTP routers redirect traffic to port 443. A listener is selected based on the path specified in the request URI and passes traffic to the assigned service:
alb-demo-2. For each service, its own backend group is created according to its configuration.
For more information about installing and using the controller, see the Configuring the Application Load Balancer Ingress controller use case in the Managed Service for Kubernetes documentation.