Skip to content
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

Headless minikube, help accessing the dashboard web page? #19704

Closed
kelvtech-co-uk opened this issue Sep 25, 2024 · 1 comment
Closed

Headless minikube, help accessing the dashboard web page? #19704

kelvtech-co-uk opened this issue Sep 25, 2024 · 1 comment

Comments

@kelvtech-co-uk
Copy link

What Happened?

Just starting out so I'm expecting this is all user error sorry but I'd appreicate pointing in the right direction.

Running minikube with the docker driver and the courseware I'm following is trying to demonstrate the dashboard web interface. FWIW some of my other containers I put in a macvlan network but the rest are in a docker bridge network. Naively I thought I'd just be able to instruct minikube to use one of my custom docker macvlan networks and take an IP I'd specify?

Using minikube start --force --driver=docker --network=bridge works except inspecting the minikube container the HostIP for all the port assignments is 127.0.0.1. Also I'm noting that the dashboard url uses a socket where the port isn't within the range of mapped ports to the container.

I found the --listen-address start parameter which helps move the container to listen on say 0.0.0.0 but I'm still struggling then with the port mapping misalignment.

I also looked at kubectl proxy and changed the port and address values e.g. kubectl proxy -p 8100 --address 0.0.0.0 and I can reach that from my workstation and get a page just saying "Forbidden", not sure though I've understood the linkage to the dashboard correctly here yet so apols if this is superflous.

Thanks in advance.

Attach the log file

log.txt

Operating System

Other

Driver

Docker

@kelvtech-co-uk kelvtech-co-uk changed the title Can minikube run on a headless server? Headless minikube, help accessing the dashboard web page? Sep 25, 2024
@kelvtech-co-uk
Copy link
Author

kelvtech-co-uk commented Nov 4, 2024

FWIW the above nearly works, I was missing the --accept-hosts parameters and I was also probably constructing the URL with an incorrect IP address.

kubectl proxy --address=0.0.0.0 --port=8050 --accept-hosts='.*'

http://ipaddress:8050/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/
Using the server IP where the kubectl command was run and the port provided in the command then makes the dashboard url accessible.

Also worth to note that the --network and --listen-address parameters in the initial minikube command are superfluous and probably should be omitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant