Skip to content

High CPU consumption nginx-ingress-controller if the ingress object has a non-existent service specified. #12902

Open
@anvpetrov

Description

@anvpetrov

When setup nginx ingress controller(latest version) with --enable-ssl-passthrough flag , and create ingress object with annotations:

    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
    nginx.ingress.kubernetes.io/ssl-passthrough: 'true'

and specify fake service name (we will specify a service that does not exist).
It is enough to call ingress once via curl and the nginx-ingress-controller processes will dramatically increase PROCESSOR consumption.

kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
  annotations:
    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
    nginx.ingress.kubernetes.io/ssl-passthrough: 'true'
  name: test
  namespace: test
spec:
  ingressClassName: test
  tls:
    - hosts:
        - test.com
  rules:
    - host: test.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: fake-svc
                port:
                  number: 443

curl -vk --resolve test.com:443:INGRESS_IP https://test.com/

in the network dump, we see thousands of requests per second to 127.0.0.1:443

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/supportCategorizes issue or PR as a support question.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions