-
Notifications
You must be signed in to change notification settings - Fork 3.8k
All kubelet targets down - 401 Unauthorized ? #926
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
Comments
Please note the Basically your cluster needs to be RBAC enabled and these two kubelet flags need to be enabled:
Feel free to ask any further questions, but this is not an issue with the Prometheus operator or kube-prometheus stack, so I'm closing this here. |
FWIW this seems to resolve the issue - kubernetes/kubernetes#44330 (comment) |
for future googlers, changing the kubelet (
|
Running on GKE, I solved a similar issue with adding
|
|
I had the same problem, using GKE. Solved it by updating the
After this, the Prometheus server was able to scrape the |
Also applies to AKS, I switched the ServiceMonitor to http as workaround. |
Apparently this is known behaviour. See the |
Confirming you still need to use this in the kubelets ServiceMonitor for GKE:
|
Not sure if this is the right place to leave this, but adding it here as I hit a similar issue and this was the first result. I was using AWS/EKS, but I think this has more to do with k8s v1.11. It seems now the read-only port is disabled by default now. I had to re-enable this on all my nodes. I am using a launch configuration and ASGs, so that would look something like this:
after this change all worked as expected. Another thing that made the issue more obvious that in prometheus under /targets you could see connection being refused along with data missing in grafana. It took way to long for me to find this, so hopefully it helps someone else out. |
@gb-ckedzierski, since you're modifying the kubelet config anyway, you should leave the
|
We tried the way @vsinha suggested, and we encountered another problem. The cadvisor metrics always return
|
@markya0616 you're requesting a different port than @vsinha. What you're requesting is the standalone cadvisor port (which has been removed in 1.13 I believe). |
In the latest helm chart, set
This forces kubelet exporter to scrape the EDIT: s/http/https/ |
@kevinjqiu thanks for the pointer! btw, your snippet there is incorrect. s/http/https/ |
@jwineinger Thanks. Updated. |
I just confirmed that on AKS, |
I still had to set @kevinjqiu values to make this work, though the latest |
In case anyone comes across this issue again with AKS and k8s - kubelet:
- serviceMonitor:
- https: false fixes the issue. |
Uh oh!
There was an error while loading. Please reload this page.
What did you do?
./contrib/kube-prometheus/hack/cluster-monitoring/deploy
What did you expect to see?
Everything working fine.
What did you see instead? Under which circumstances?
Everything is fine except
kubelet
on the Prometheus targets page, all areDOWN
with errorserver returned HTTP status 401 Unauthorized
Environment
GKE / Ubuntu 17.10
Kubernetes version information:
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.6", GitCommit:"6260bb08c46c31eea6cb538b34a9ceb3e406689c", GitTreeState:"clean", BuildDate:"2017-12-21T06:34:11Z", GoVersion:"go1.8.3", Compiler: "gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"8+", GitVersion:"v1.8.6-gke.0", GitCommit:"ee9a97661f14ee0b1ca31d6edd30480c89347c79", GitTreeState:"clean", BuildDate:"2018-01-05T03:36:42Z", GoVersion:"go1.8.3b4", Compiler:"gc", Platform:"linux/amd64"}
The text was updated successfully, but these errors were encountered: