[EKS] [request]: Feature request: HTTPS metrics to be fetched for Kube-state metrics pod when installed in Kube-system namespace
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
What do you want us to build?
Currently I have installed kube-state metrics in kube-system namespace in EKS. When I use Amazon Managed Prometheus with below scrapper using HTTPs scheme, Metrics are not being pulled.:
==
job_name: kube-state-metrics-apiserver
scheme: https
authorization:
type: Bearer
credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
action: keep
regex: kube-system;eks-kube-state-metrics;http
- target_label: __address__
replacement: kubernetes.default.svc:443
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
regex: (.+);(.+);(.+)
target_label: __metrics_path__
replacement: /api/v1/namespaces/$1/services/$2:http/proxy/metrics
==
**Which service(s) is this request for?**
This could be EKS, Amazon Managed Prometheus (AMP)
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem.
This is because the service cannot get resource \"services/proxy\" in API group \"\" in the namespace \"kube-system\"" due to which the metrics are unable to be fetched via HTTPS. Can this permission be altered in EKS for this to be fixed.
**Are you currently working around this issue?**
How are you currently solving this problem?
Only workaround is to use HTTP to fetch metric.
**Additional context**
Anything else we should know?
**Attachments**
If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)
Contributor guide
Research direction
Start with the issue's HTTPS Prometheus scrape configuration and the reported services/proxy permission failure for kube-system. Determine whether EKS or Amazon Managed Prometheus owns the required permission change; done means kube-state metrics can be fetched over HTTPS without relying on the HTTP workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, prometheus
- Domain
- cloud, infrastructure, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100