Skip to content

[AutoScaling] Kubernetes Ingress Object Metrics with Community NGINX Ingress Controller #7283

@chirangaalwis

Description

@chirangaalwis

What would you like to be added:

A custom metrics API implementation for capturing the request count per unit time of a Kubernetes Ingress resource object, when using the community NGINX Ingress Controller in order to be used as a metric for Horizontal Pod Autoscaling (HPA).

The ultimate goal is to be able to add a request per unit time metric to Horizontal Pod Autoscaler as described in the walk through, when using the community NGINX Ingress Controller implementation.

type: Object
object:
  metric:
    name: requests-per-second
  describedObject:
    apiVersion: networking.k8s.io/v1beta1
    kind: Ingress
    name: main-route
  target:
    type: Value
    value: 2k

An example similar to the suggested solution can be found at Skipper collector with the kube-metrics-adapter. This particular solution works when using the skipper Ingress Controller implementation.

Why is this needed:

  • The accuracy of request per unit time, as a metric for HPA is considered to be very high. Especially, when working with container based deployments of language runtimes involving garbage collection. Please see this #sig-autoscaling Slack channel discussion for a details about this topic.

  • Community NGINX Ingress Controller being one of the most widely used implementations.

Notes:

Suggested Assignees:

@rikatz @strongjz

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions