How to scale the number of Ingress pods

7/25/2017

Is there a way to scale the number of Ingress pods based on load? I currently have:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-service
spec:
  rules:
  - host: my-service
    http:
      paths:
      - path: /
        backend:
          serviceName: my-service
          servicePort: 80

and the Ingress Controller with the appropriate nginx-ingress-controller.

I had previously though that the ingress-controller will handle scaling for us? But what is the right way to handle this?

-- phpnovice
kubernetes

1 Answer

7/25/2017

Ingress can not be scaled, ingress is a set of traffic routing rules and configuration.

Ingress Controller on the other hand can.

The "dummy" way to scale nginx-ingress with the number of nodes in cluster would be to run it as a DaemonSet.

A more sophisticated aproach to this, would be to use Horizontal Pod Autoscaling which can scale based on resource utilisation.

In both cases you do not scale the Ingress, but the Ingress Controller, meaning this is not related to traffic/load for that one ingress, but for all ingresses (of given type if you have different)

-- Radek 'Goblin' Pieczonka
Source: StackOverflow