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

Cannot create Kubernetes discovery #1288

Closed
coocla opened this Issue Jan 6, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@coocla
Copy link

coocla commented Jan 6, 2016

My k8s apiserver without any verification,so my prometheus.yaml is:

- job_name: 'kubernetes'
  kubernetes_sd_configs:
  - masters:
    - 'http://172.16.1.12:8080'
    in_cluster: false

When I start, I get

prometheus, version 0.16.1 (branch: release-0.16.1, revision: 968ee35)
  build user:       fabianreinartz@macpro
  build date:       20151016-13:19:57
  go version:       1.5
INFO[0000] Loading configuration file prometheus.yml     source=main.go:196
ERRO[0000] Cannot create Kubernetes discovery: open : no such file or directory  source=targetmanager.go:424
INFO[0000] Loading series map and head chunks...         source=storage.go:262
INFO[0000] 309 series loaded.                            source=storage.go:267
INFO[0000] Listening on :9090                            source=web.go:223

Can you help me,Which file I lack?

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jan 7, 2016

Looks like a problem reading the CA certificate. You might want to try setting a tls_config with insecure_skip_verify: true.

@jimmidyson

This comment has been minimized.

Copy link
Member

jimmidyson commented Jan 7, 2016

That's a terrible error message - hope to get some time to clean it up soon.

@jimmidyson

This comment has been minimized.

Copy link
Member

jimmidyson commented Jan 7, 2016

Ah looks like I've already done that in HEAD so should be in next release.

@jimmidyson

This comment has been minimized.

Copy link
Member

jimmidyson commented Jan 7, 2016

Fixed in 7ff5cc6

@jimmidyson

This comment has been minimized.

Copy link
Member

jimmidyson commented Jan 7, 2016

This was actually a bug reading the service account token file IIRC.

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Jan 7, 2016

OK, closing this then. Please re-open if it turns out to be a different issue.

@beorn7 beorn7 closed this Jan 7, 2016

@coocla

This comment has been minimized.

Copy link
Author

coocla commented Jan 8, 2016

@beorn7 setting a is_config with insecure_skip_verify: true not effective, So I may have to wait for the next release or setting cadvisor address replace kubernetes_sd_configs ?

I try setting is_config with ca_filecert_filekey_file error still exists.

@jimmidyson

This comment has been minimized.

Copy link
Member

jimmidyson commented Jan 8, 2016

As I said above this is due to bearer token file handling when running in a pod, fixed in master. If you're running a Docker container then you can use prom/prometheus:master image that contains the fix, although be aware there are some changes to Prometheus config that you would need to do.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 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 24, 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.