rook: Could not access Ceph dashboard
Is this a bug report or feature request?
- Bug Report
Deviation from expected behavior: using https://github.com/rook/rook/blob/master/cluster/examples/kubernetes/ceph/cluster.yaml which enabled dashboard default but I cannot access ceph dashboard when port-forward or even exec into container :
$ kubectl -n rook-ceph exec -ti rook-ceph-mgr-a-976ccf6b9-k44xc bash [root@rook-ceph-mgr-a-976ccf6b9-k44xc /]# curl -k https://localhost:8443 curl: (7) Failed connect to localhost:8443; Connection refused
$ kubectl -n rook-ceph port-forward rook-ceph-mgr-a-976ccf6b9-7vrvn 8443 Forwarding from 127.0.0.1:8443 -> 8443 Forwarding from [::1]:8443 -> 8443 Handling connection for 8443 E0121 17:32:25.239419 16315 portforward.go:331] an error occurred forwarding 8443 -> 8443: error forwarding port 8443 to pod c7b923f23b29f2331dbb019ebd89a433338db17b1fd2514e4743bb607a85f63f, uid : exit status 1: 2019/01/21 10:32:25 socat[11551] E connect(5, AF=2 127.0.0.1:8443, 16): Connection refused
Expected behavior:
Could access ceph-dashboard
How to reproduce it (minimal and precise):
helm install --wait -n rook --namespace rook-ceph-system rook-stable/rook-ceph
kubectl apply -f https://raw.githubusercontent.com/rook/rook/master/cluster/examples/kubernetes/ceph/cluster.yaml
then try to access Ceph dashboard
Environment:
- OS (e.g. from /etc/os-release): Ubuntu
- Kernel (e.g.
uname -a): - Cloud provider or hardware configuration: AWS
- Rook version (use
rook versioninside of a Rook Pod): rook-ceph-v0.9.1 - Kubernetes version (use
kubectl version): 1.11.6 - Kubernetes cluster type (e.g. Tectonic, GKE, OpenShift): Kops
- Storage backend status (e.g. for Ceph use
ceph healthin the Rook Ceph toolbox):
kubectl -n rook-ceph exec rook-ceph-tools-b5759df6b-6tq5d – ceph health detail HEALTH_OK
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 16
- Comments: 24 (6 by maintainers)
You can also access the dashboard using
kubectl proxyand an apiserver proxy URL:http://localhost:8001/api/v1/namespaces/rook-ceph/services/https:rook-ceph-mgr-dashboard:https-dashboard/proxy/in the browser.Maybe check this: https://github.com/rook/rook/issues/2492#issuecomment-465543730 It may help…
In short:
The reason for port-forward not working is due to the fact that the dashboard is only listening on the Pod IP and not localhost (anymore), but port-forward is only “connecting” to localhost. That is causing the error when trying to access the dashboard through port-forward.
@travisn
On Mon, 28 Jan 2019, 21:12 Chey, notifications@github.com wrote:
We should be able to
port-forwardthe service but it’s not working for me either. That being said as a work around theNodePortoption does work as described here.