Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upError polling from Kubernetes API server #1499
Comments
This comment has been minimized.
This comment has been minimized.
|
/cc @jimmidyson |
This comment has been minimized.
This comment has been minimized.
|
Hmm that is interesting. I've seen this in a couple of totally unrelated libraries in other langs (Java & Ruby) - wondering if it's a bug in Kubernetes mounted secrets rather than in Prometheus. In the Prometheus pod can you check that the ca file in |
brian-brazil
added
the
bug
label
Mar 30, 2016
This comment has been minimized.
This comment has been minimized.
|
Yes the ca files are the same: The one used by the pod:
The one used by the API server:
|
fabxc
added this to the v1.0.0 milestone
Apr 25, 2016
fabxc
added
kind/bug
and removed
bug
labels
Apr 28, 2016
This comment has been minimized.
This comment has been minimized.
bharrisau
commented
May 3, 2016
•
|
Just a note - the And I'm getting the same error, even though all my endpoints are appearing. It looks like the endpoints are being scraped correctly, but the |
This comment has been minimized.
This comment has been minimized.
|
The example config at https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml works:
|
brian-brazil
added
the
component/service discovery
label
Jun 15, 2016
This comment has been minimized.
This comment has been minimized.
|
@guoshimin so was this is a misconfiguration and is resolved? |
This comment has been minimized.
This comment has been minimized.
|
According to the documentation, if I set in_cluster to be true, it should automatically use the CA cert and token mounted in the secret volume. Why do I still need to set the CA cert explicitly? That said, it's working for us now, so not a big deal for us. |
This comment has been minimized.
This comment has been minimized.
|
@jimmidyson would be the expert here |
This comment has been minimized.
This comment has been minimized.
|
"Expert". It should work as you mentioned with |
This comment has been minimized.
This comment has been minimized.
mindfulmonk
commented
Jul 1, 2016
|
I"m hitting the same bug. I looks like a prometheus problem when using in_cluster=false The following curl works:
The prometheus looks like this:
and gives the following error:
I tried with:
but that gives the same error. |
This comment has been minimized.
This comment has been minimized.
|
There are two levels of TLS config – once for scraping and once for talking to the API server. |
This comment has been minimized.
This comment has been minimized.
mindfulmonk
commented
Jul 1, 2016
|
This comment has been minimized.
This comment has been minimized.
|
You've set |
This comment has been minimized.
This comment has been minimized.
mindfulmonk
commented
Jul 1, 2016
|
Thanks @jimmidyson I finally understand the difference between scraping and service discovery. The following config works fine:
The kubernetes_sd_configs section is for discovery of targets, it this case it queries the kubernetes api and returns a list of targets like https://kubernetes.default.svc:443/metrics then prometheus scrapes that target. In this case the target and discovery endpoints are the same, but if you had the kubernetes_sd_configs discover other application target nodes, those might have different certs and bearer_tokens. |
This comment has been minimized.
This comment has been minimized.
|
Okay, I'm closing this issue for now as it seems most reports boil down to configuration. |
fabxc
closed this
Jul 1, 2016
This comment has been minimized.
This comment has been minimized.
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. |
guoshimin commentedMar 23, 2016
Getting this error polling the api server:
Here's the snippet from my config:
version: 0.17.0
Certificate served by api-server (removed some clutter):
ca.crt in serviceaccount (again, removed some clutter):
Note that X509v3 Authority Key Identifier in the server cert matches the X509v3 Subject Key Identifier in the CA cert.