keda icon indicating copy to clipboard operation
keda copied to clipboard

how activate it via http access, e.g. by accessing the fully qualified domain name of k8s?

Open RonaldFletcher opened this issue 1 year ago • 4 comments

Proposal

When replicaset is 0, I can access the k8 fully-qualified domain via http, and its de-activation job makes its replicaset 0 to 1

Use-Case

No response

Is this a feature you are interested in implementing yourself?

No

Anything else?

No response

RonaldFletcher avatar Feb 04 '24 14:02 RonaldFletcher

Hey! Are you asking about HTTP based autoscaling? If yes, I'd suggest checking this the HTTP Add-on: https://github.com/kedacore/http-add-on

JorTurFer avatar Feb 04 '24 21:02 JorTurFer

@JorTurFer I have a question, if I go to access the service directly through the FQDN of k8's service, http-add-on doesn't seem to take effect, the service can't be activated

RonaldFletcher avatar Feb 05 '24 01:02 RonaldFletcher

It depends on how you do it, if you want to call the FQDN directly using the add-on, you should configure the add-on to proxy that host (in hosts section) and call the the FQDN of the add-on with the Host header of your service FQDN. It's not something 100% direct, but it's something easily doable.

If you are looking for something 100% transparent using the FQDN of k8s server, KEDA can't help you because it's not a service mesh who can enforces the traffic.

JorTurFer avatar Feb 05 '24 08:02 JorTurFer

For example, this e2e test covers that scenario: command: ["curl", "-H", "Host: {{.Host}}", "keda-http-add-on-interceptor-proxy.keda:8080"]

Basically, it calls directly to interceptor service but setting the host header with the value of the workload's k8s service FQDN behind it

JorTurFer avatar Feb 05 '24 08:02 JorTurFer