Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running together with metrics-server #561

Closed
igoratencompass opened this issue Feb 1, 2023 · 12 comments
Closed

Running together with metrics-server #561

igoratencompass opened this issue Feb 1, 2023 · 12 comments
Assignees
Labels
kind/support Categorizes issue or PR as a support question. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@igoratencompass
Copy link

What happened?:

After deploying prometheus-adapter In a cluster where I have metrics-server running I get a clash around the APIService/v1beta1.metrics.k8s.io resource as it seems being created by both. Do we need to remove metrics-server before installing prometheus-adapter ?

Environment:

  • prometheus-adapter version: helm chart v4.1.1
  • prometheus version: helm chart v15.9.0
  • Kubernetes version (use kubectl version): EKS v1.22
  • Cloud provider or hardware configuration: AWS
  • Other info:
@igoratencompass igoratencompass added the kind/bug Categorizes issue or PR as related to a bug. label Feb 1, 2023
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Feb 1, 2023
@shinebayar-g
Copy link

shinebayar-g commented Feb 5, 2023

I couldn't find the source for this. But IIRC I don't think you're supposed to run both. You can remove metrics-server and keep using prometheus-adapter as it covers the functionality of the metrics-server. Pls correct me if I'm wrong.

@igoratencompass
Copy link
Author

I understand it same, the adapter should provide the functionality of the metrics-server plus custom and external metrics support. It sucks that kubectl top does not work upon metrics-server removal as it is an easy way to confirm if everything is a OK.

To be even more complicated we also use Datadog with external metrics which in turn clashes about APIService/v1beta1.external.metrics.k8s.io resource with the adapter, seems no way to win this three-way battle and have all corners covered :-)

@shinebayar-g
Copy link

shinebayar-g commented Feb 9, 2023

It sucks that kubectl top does not work upon metrics-server removal as it is an easy way to confirm if everything is a OK.

It should work? (If prometheus-adapter is installed afterwards).

@logicalhan
Copy link
Contributor

/triage accepted
/assign @dgrisonnet

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 9, 2023
@dgrisonnet
Copy link
Member

It should work? (If prometheus-adapter is installed afterwards).

Yeah if you have configured resource metrics, it should work.

To be even more complicated we also use Datadog with external metrics which in turn clashes about APIService/v1beta1.external.metrics.k8s.io resource with the adapter, seems no way to win this three-way battle and have all corners covered :-)

There is an effort that was started a while ago but didn't make much progress, to support multiple external metrics providers: kubernetes-sigs/custom-metrics-apiserver#70.

But if you use both Prometheus and Datadog metrics for autoscaling I would recommand KEDA: https://github.com/kedacore/keda. It is a CNCF project that support autoscaling on both datasources and many more.

@dgrisonnet
Copy link
Member

/kind support

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Feb 9, 2023
@dgrisonnet dgrisonnet removed the kind/bug Categorizes issue or PR as related to a bug. label Feb 9, 2023
@igoratencompass
Copy link
Author

It should work? (If prometheus-adapter is installed afterwards).

The problem is we use ArgoCD that constantly reconciles the deployments hence if we have datadog, metrics-server and prometheus-adapter installed they are constantly overwriting each others shared objects, quite unnerving watching this going on for ever in the UI really.

@k8s-triage-robot
Copy link

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

  • Confirm that this issue is still relevant with /triage accepted (org members only)
  • Close this issue with /close

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. and removed triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Mar 1, 2024
@dashpole
Copy link

dashpole commented Mar 7, 2024

Sorry we didn't get to this. If this is still affecting you, feel free to reopen.
/close

@k8s-ci-robot
Copy link
Contributor

@dashpole: Closing this issue.

In response to this:

Sorry we didn't get to this. If this is still affecting you, feel free to reopen.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@satdeveloping
Copy link

@dashpole This is still a thing, can you reopen?

@dgrisonnet
Copy link
Member

I feel like this should remain closed as I have already shared the current initiative that would fix your issue and a potential alternative you could use in the meantime. There is nothing more that can be done.

As I mentioned before there are three ways to go about the problem:

  1. Use dedicated APIs for each metrics server. There are three of them and you have three metrics server so maybe something can be worked there. This is quite hacky and might not be suited to what you are trying to achieve
  2. Move to using a combination of KEDA + metrics-server as KEDA could be a good replacement to datadog and prometheus-adapter as it supports both datadog and prometheus as scalers.
  3. Wait for Proposal: Support multiple custom/external metrics servers in the cluster custom-metrics-apiserver#70 to be implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

8 participants