-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Can't access Kubernetes Dashboard from outside the cluster (VirtualBox host ) #9160
Comments
I have everything working by exposing the dashboard like this:
|
Oh and I also have MetalLB installed to expose external IP automatically |
@lprimak I'll give it a shot but my kubernetes install is on a vm not a managed cluster within a cloud platform. I always thought LoadbBalancer meant using cloud controller manager based resource. I find the kube dashboard documentation regarding access a bit confusing and not that sufficient. |
Yes. Same setup here. VM on premises |
Here is my MetalLB config for your reference: https://github.com/lprimak/infra/blob/main/scripts/cloud/oci/k8s/metallb-config.yaml |
I just tried . and the URL still doesn't work . |
Not localhost. You have to see external IP for dash board and connect your browser there. No 8443 |
ok I understand what you meant , I just don't know how metallb once configured can alow me to access kube dashboard endpoint from my virtualbox host as I only use guest/host port forwarding for now. my --pod-network-cidr is 192.168.0.0/16 btw |
Yes. MetalLB needs to be installed and functioning to get an external IP. External IP can be accessed from your local network because your VM host is on the network somehow or you will need to make it accessible from the VirtualBox side |
Thank you @lprimak for the context. I'll install MetalLB, but I also hoped I could fix the basic proxy or port forwarding issue I shared. |
After I checked the metallb doc and created the addresspool and l2advertisement . I updated the kube dash service as you suggested which now has an external IP. But It still not accessible although I can ping the IP from my host.
192.168.56.100 :8443 --- times out
|
Bottom is that it didn't work !! Kubernetes dash is one of those tools that are nice on the paper but not that simple to use . |
if you close issues automatically at least add a line or two explaining why. This is not helpful for the users at all. |
Not port 8443. Regular https port (443). And looks like you closed that issue yourself (probably by accident :) |
ouch , My apologies . I have been in projects where issues were closed before we got to the bottom of it.
|
Then you need to use the same port in your vagrant config as in your |
I did the other way around
and kept the loadbalancer with the same port and endpoint but it's still times out.
192.168.56.100:8443 --- times out |
Actually, I don't think you can forward your port that way. |
Also there is NodePort type of service available and I think you can port forward via vagrant with that |
But you are still forwarding ports. You need to access the external IP directly. |
I can try
after that I think it'll run out of options. docker does a better job at exposing its containers. |
I suggest to abandon your idea of port forwarding, just use external IP like it's intended (i.e. Directly) without any port forwarding. |
I'll try without forwarding but I don't think External IP socket will work . will let you know |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
What happened?
0
Hi I have kubernetes provisioned in my vagrant build using virtualbox.
See git repo
I have set the port forwarding in the vagrantfile as shown below
Here is the kubernetes setup successfully deployed during provisioning
==== Install the kubernetes Dashboard
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
Endpoints:
pods:
Service:
I tried both proxy and port-forwarding and it didn't work:
1. Proxy : I tried with different ports (8001/443)
HTTP URL:
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
http://localhost:8090/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
test from the Vbox host:
Behavior : No Access ERR_CONNECTION_RESET
2. Port forwarding:
Listen on port 8443 on all addresses, forwarding to 443 in the pod
test from the Vbox host:
https://localhost:8443
Behavior : No Access ERR_CONNECTION_RESET
I'm I missing something ?
What did you expect to happen?
access Kubernetes console
How can we reproduce it (as minimally and precisely as possible)?
clone repo :
https://github.com/brokedba/Devops_all_in_one_vm/tree/main/OL7
cd Devops_all_in_one_vm/OL7
vagrant up
Anything else we need to know?
No response
What browsers are you seeing the problem on?
No response
Kubernetes Dashboard version
v2.7.0
Kubernetes version
v.1.28
Dev environment
No response
The text was updated successfully, but these errors were encountered: