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

Error scraping kubernetes apiserver endpoints in minikube with example prometheus configuration #4120

Closed
yunlzheng opened this Issue Apr 28, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@yunlzheng
Copy link

yunlzheng commented Apr 28, 2018

Proposal

Use case. Why is this important?

Nice to have' is not a good use case :)

Bug Report

What did you do?

# From Example
kubectl create -f prometheus-rbac-setup.yml 

# From Example
kubectl create configmap prometheus --from-file=prometheus.yml=kubernetes-prometheus.yml 

# This is my custom file
kubectl create -f prometheus-deployments.yml 

What did you expect to see?

Prometheus can discovery the kubernetes-apiservers,kubernetes-cadvisor and kubernetes-nodes targets and success scraping metrics data

What did you see instead? Under which circumstances?

The target kubernetes-apiservers scraping error with messahe:

Get https://10.0.2.15:8443/metrics: x509: certificate is valid for 192.168.99.100, 10.96.0.1, 10.0.0.1, not 10.0.2.15

Environment

  • System information:

    $ uname -srm
    Linux 4.9.13 x86_64

  • Prometheus version:

    /prometheus $ prometheus --version
    prometheus, version 2.2.1 (branch: HEAD, revision:
    bc6058c)
    build user: root@149e5b3f0829
    build date: 20180314-14:15:45
    go version: go1.10

  • Prometheus configuration file:

https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml

  • Logs:
level=info ts=2018-04-28T07:47:07.604327895Z caller=web.go:382 component=web msg="Start listening for connections" address=0.0.0.0:9090
level=info ts=2018-04-28T07:47:07.668295285Z caller=main.go:514 msg="TSDB started"
level=info ts=2018-04-28T07:47:07.668350545Z caller=main.go:588 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml
level=info ts=2018-04-28T07:47:07.669727547Z caller=kubernetes.go:191 component="discovery manager scrape" discovery=k8s msg="Using pod service account via in-cluster config"
level=info ts=2018-04-28T07:47:07.670966244Z caller=kubernetes.go:191 component="discovery manager scrape" discovery=k8s msg="Using pod service account via in-cluster config"
level=info ts=2018-04-28T07:47:07.673711432Z caller=kubernetes.go:191 component="discovery manager scrape" discovery=k8s msg="Using pod service account via in-cluster config"
level=info ts=2018-04-28T07:47:07.674561758Z caller=kubernetes.go:191 component="discovery manager scrape" discovery=k8s msg="Using pod service account via in-cluster config"
level=info ts=2018-04-28T07:47:07.675461852Z caller=kubernetes.go:191 component="discovery manager scrape" discovery=k8s msg="Using pod service account via in-cluster config"
level=info ts=2018-04-28T07:47:07.676243663Z caller=kubernetes.go:191 component="discovery manager scrape" discovery=k8s msg="Using pod service account via in-cluster config"
level=info ts=2018-04-28T07:47:07.677061016Z caller=kubernetes.go:191 component="discovery manager scrape" discovery=k8s msg="Using pod service account via in-cluster config"
level=info ts=2018-04-28T07:47:07.677799305Z caller=main.go:491 msg="Server is ready to receive web requests.
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Apr 28, 2018

It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.