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

Aims to fix https://github.com/stefanprodan/k8s-prom-hpa/issues/20 #27

Conversation

stafot
Copy link
Contributor

@stafot stafot commented Jan 14, 2019

Based on feedback from AWS EKS team which told me:
" looks like you're running a pre 0.3.0 metrics server
You need 0.3.0, as it contains the latest K8s dependencies, which contain our fix"

@stefanprodan
Copy link
Owner

Hi @stafot thanks for the PR. Have you tested this on EKS?

@stafot stafot force-pushed the hotfix/custom-metrics-apiserver-image branch from 0f8af36 to e1dab0a Compare January 15, 2019 08:45
@stafot
Copy link
Contributor Author

stafot commented Jan 15, 2019

@stefanprodan Tested today. made some follow up fixes/additions which were based on this approach. And now it is working.
custom-metrics-apiserver

If you want more info let me know.

@stefanprodan
Copy link
Owner

Thanks for testing it. With this config do you get the podinfo http_requests metric when you do kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1/namespaces/default/pods/*/http_requests" ?

@stafot
Copy link
Contributor Author

stafot commented Jan 15, 2019

@stefanprodan Nope. Probably I need a different config file based on my needs or a more generic one. Am I right?

The response is the following:

Error from server (NotFound): the server could not find the metric http_requests for pods

@stafot
Copy link
Contributor Author

stafot commented Jan 15, 2019

@stefanprodan Even if custom-metrics-apiserver looks to work as expected based on log outputs I get, None of the raw kubectl commands you shared for testing works. So probably I have something misconfigured, still don't find what it is though yet.

@stafot
Copy link
Contributor Author

stafot commented Feb 4, 2019

@stefanprodan I can confirm that this PR works as expected, so if you don;t mind please merge it. In my case the problem was that I used kube-prometheus so my prometheus url was prometheus-k8s and not prometheus as custom-metrics-apiserver expected by default. So a possible improvement to my PR could be to make prometheus url environment variable to be clearer that might varies in different use cases.

@stefanprodan
Copy link
Owner

Thanks @stafot

@stefanprodan stefanprodan merged commit cbb5c51 into stefanprodan:master Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants