dashboard: Dashboard 404s on stylesheets & scripts
Environment
I’m running a K8s cluster on a CentOS7 vagrant VM. The VM has a hostnetwork adapter and the cluster is installed with kubeadm
Dashboard version: (Container version) gcr.io/google_containers/kubernetes-dashboard-amd64@sha256:2c4421ed80358a0ee97b44357b6cd6dc09be6ccc27dfe9d50c9bfc39a760e5fe
Kubernetes version:
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T09:14:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.6", GitCommit:"4bc5e7f9a6c25dc4c03d4d656f2cefd21540e28c", GitTreeState:"clean", BuildDate:"2017-09-14T06:36:08Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Operating system: CentOS7
Node.js version: ?
Go version: ?
Steps to reproduce
- Installed a cluster using
kubeadmon CentOS7 - Run
kubectl create -f https://git.io/kube-dashboard kubectl proxy --address=<routable-IP> --port=<PORT> --accept-hosts="^*$"
Observed result
Going to the dashboard in a browser I see a white screen.
Opening chrome’s dev console I see a bunch of 404s
GET https://<IP>/api/v1/namespaces/kube-system/services/kubernetes-dashboard/static/vendor.9aa0b786.css
proxy:1 GET https://<IP>/api/v1/namespaces/kube-system/services/kubernetes-dashboard/static/app.8ebf2901.css
proxy:5 GET https://<IP>/api/v1/namespaces/kube-system/services/kubernetes-dashboard/api/appConfig.json
proxy:5 GET https://<IP>/api/v1/namespaces/kube-system/services/kubernetes-dashboard/static/app.68d2caa2.js
proxy:5 GET https://<IP>/api/v1/namespaces/kube-system/services/kubernetes-dashboard/static/vendor.840e639c.js
proxy:5 GET https://<IP>/api/v1/namespaces/kube-system/services/kubernetes-dashboard/api/appConfig.json
proxy:5 GET https://<IP>/api/v1/namespaces/kube-system/services/kubernetes-dashboard/static/app.68d2caa2.js
Going to one of those links I see.
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "the server could not find the requested resource",
"reason": "NotFound",
"details": {},
"code": 404
}
kube-dashboard container logs
kubectl logs kubernetes-dashboard-3313488171-6v53b -n kube-system
Using HTTP port: 8443
Using in-cluster config to connect to apiserver
Using service account token for csrf signing
No request provided. Skipping authorization header
Successful initial request to the apiserver, version: v1.7.6
No request provided. Skipping authorization header
Creating in-cluster Heapster client
Could not enable metric client: Health check failed: the server could not find the requested resource (get services heapster). Continuing.
Expected result
Expected the normal kube dashboard. (I have seen this set up work on 9.13.17)
Comments
This exact set up was running yesterday 9.13, and today on 9.14 I set up my VM cluster in the same way and see this error. I’m fairly certain its not an error on my end, maybe the dashboard container was updated and caused an issue?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 44 (19 by maintainers)
You can also try to access
http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard/. It requires a bit different set of privileges to access.Thanks @floreks that now solves the problem for me.
TL;DR Simply add a trailing slash to the
http://localhost:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxyurl to reset issues caused by previously dodgy auth.@floreks Just deployed a new 1.7.6 cluster via kubeadm and calico network provider and got exactly the same problem.
If i try to access the dashbaord via kubectl proxy, then i get a redirect from
which just gives me a white blank page (could not load resources etc.). If i use the link you provided
it works as it should. So is there maybe a wrong redirect? The URLs are different (“proxy” at the beginning vs. at the end) …
@TomHutter https://github.com/kubernetes/dashboard/wiki/FAQ#i-am-seeing-404-errors-when-trying-to-access-dashbord-dashboard-resources-can-not-be-loaded
Interestingly enough that just works
I have set up a cluster where there are 2 nodes. One is Master and Other is a node, both on different Azure ubuntu VMs. For networking, I used Canal tool.
When I tried to create kubernetes Dashboard with
and set proxy as
When I hit url
http://<master IP>:8001in browser, it shows following outputBut when I tries to hit
http://<master IP>:8001/uiI am not able to see Kubernetes dashboard. Instead I see following outputCould you please help me resolving dashboard issue?
Thanks in advance
Thanks @floreks @jujhars13
Did it for me! 😃
I have the same problem. What I found out so far:
http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/static/vendor.840e639c.js
=> 404
http://127.0.0.1:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy/static/vendor.840e639c.js
works! I there something wrong with the static assets path? static vs. proxy/static
I’ll try to check it on 1.7.6 cluster today and post the results.