Installation method: kubeadm
Kubernetes version: v1.15.1
Dashboard version: v2.0.0-beta2
Operating system: centos 7
Node.js version ('node --version' output):
Go version ('go version' output):
Deploy the dashboard :-
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta2/aio/deploy/recommended.yaml
kubectl proxy
[root@localhost vagrant]# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-749c59cd8d-c498f 1/1 Running 0 7m21s
kube-system coredns-749c59cd8d-xnzsc 1/1 Running 0 7m21s
kube-system etcd-localhost.localdomain 1/1 Running 0 8m26s
kube-system kube-apiserver-localhost.localdomain 1/1 Running 0 8m44s
kube-system kube-controller-manager-localhost.localdomain 1/1 Running 0 8m35s
kube-system kube-flannel-ds-amd64-746gz 1/1 Running 0 8m30s
kube-system kube-proxy-4tx9d 1/1 Running 0 9m21s
kube-system kube-scheduler-localhost.localdomain 1/1 Running 0 8m34s
kubernetes-dashboard dashboard-metrics-scraper-6ff95d79d8-qtzwg 1/1 Running 0 6m14s
kubernetes-dashboard kubernetes-dashboard-75dc45f799-66wfm 1/1 Running 0 6m14s
should be able to access dashboard from browser
http://192.168.33.14:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
Observed result doesn't make sense. It does not tell us anything. Provide more useful information or close.
unable to access dashboard from browser used the below url
http://192.168.33.14:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
dashboard pods are running successfully
You have written that you are using kubectl proxy and by default it is exposed only on localhost. Using interface ip won't work.
/close
@floreks: Closing this issue.
In response to this:
You have written that you are using
kubectl proxyand it is exposed only on localhost. Using interface ip won't work./close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
should i expose service using nodeport
[root@localhost vagrant]# kubectl get services -n kubernetes-dashboard
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
dashboard-metrics-scraper ClusterIP 10.103.20.66
kubernetes-dashboard NodePort 10.99.112.120
when exposed to nodeport got following error on browser.
Client sent an HTTP request to an HTTPS server.
can you please share any document for dashboard if present.
It was not updated for v2 but steps are basically the same: https://github.com/kubernetes/dashboard/wiki/Accessing-Dashboard---1.7.X-and-above#nodeport
According to the documentation older version has dashboard exposed using http also but not for the newer beta release i found nothing.
Alternative setup
This setup is not fully secure. Certificates are not used and Dashboard is exposed only over HTTP. In this setup access control can be ensured only by using Authorization Header feature.
To deploy Dashboard execute following command:
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/alternative/kubernetes-dashboard.yaml
Works for me at
http://127.0.0.1:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login
The problem has been closed. But this post will help those who come later:
https://medium.com/@sondnpt00343/deploying-a-publicly-accessible-kubernetes-dashboard-v2-0-0-betax-8e39680d4067
Works for me at
http://127.0.0.1:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login
not for public-ip or external ip
[root@localhost vagrant]# kubectl get services -n kubernetes-dashboard
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
dashboard-metrics-scraper ClusterIP 10.103.20.66 8000/TCP 6m20s
kubernetes-dashboard NodePort 10.99.112.120 443:31559/TCP 6m20swhen exposed to nodeport got following error on browser.
Client sent an HTTP request to an HTTPS server.can you please share any document for dashboard if present.
I also encountered the same problem.
$sudo kubectl get service --all-namespaces
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default kubernetes ClusterIP 10.96.0.1
kube-system kube-dns ClusterIP 10.96.0.10
kube-system kubernetes-dashboard ClusterIP 10.104.134.130
kubernetes-dashboard dashboard-metrics-scraper ClusterIP 10.96.115.226
kubernetes-dashboard kubernetes-dashboard NodePort 10.100.236.99
$ curl 10.100.236.99:443
Client sent an HTTP request to an HTTPS server.
I also encountered the same problem.
$sudo kubectl get service --all-namespaces
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default kubernetes ClusterIP 10.96.0.1 443/TCP 39m
kube-system kube-dns ClusterIP 10.96.0.10 53/UDP,53/TCP,9153/TCP 39m
kube-system kubernetes-dashboard ClusterIP 10.104.134.130 80/TCP 7m22s
kubernetes-dashboard dashboard-metrics-scraper ClusterIP 10.96.115.226 8000/TCP 30m
kubernetes-dashboard kubernetes-dashboard NodePort 10.100.236.99 443:30001/TCP 30m$ curl 10.100.236.99:443
Client sent an HTTP request to an HTTPS server.
[root@localhost vagrant]# kubectl get services -n kubernetes-dashboard
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
dashboard-metrics-scraper ClusterIP 10.103.20.66 8000/TCP 6m20s
kubernetes-dashboard NodePort 10.99.112.120 443:31559/TCP 6m20s
when exposed to nodeport got following error on browser.
Client sent an HTTP request to an HTTPS server.
can you please share any document for dashboard if present.
- Could your problem be solved, I have encountered the same problem now?
Hi Mate,
I think your hitting URL is http://<NodeHost>:<NodePort>
our dashboard services are on https so we need to use the https protocol
try https://<NodeHost>:<NodePort>
it will work
Most helpful comment
Works for me at
http://127.0.0.1:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#/login