cnrancher / autok3s

Run K3s Everywhere
https://www.suse.com
Apache License 2.0
755 stars 76 forks source link

help: how to log in the autok3s UI #687

Closed mengfanxi-hit closed 4 days ago

mengfanxi-hit commented 5 days ago

When I try to start the AutoK3s local UI, use the command docker run -itd --restart=unless-stopped --net=host -v /var/run/docker.sock:/var/run/docker.sock cnrancher/autok3s:v0.9.3 but it prompts me to log in.How can I obtain this account? image

orangedeng commented 4 days ago

Can not reproduce your issue. I got following logs:

INFO[2024-09-13T01:21:27Z] run as daemon, listening on 0.0.0.0:8080     
WARN[2024-09-13T01:21:27Z] failed to open browser to addr 0.0.0.0:8080  

And after I access the server address with port 8080, I saw the autok3s UI. The address 0.0.0.0 in logs means that the node ip running autok3s. I assume that maybe you put 0.0.0.0 into browser directly.

JacieChao commented 4 days ago

Have you also run Rancher on your host with the same port? The login UI is for Rancher. You can change the AutoK3s port and try again.

docker run -itd --restart=unless-stopped --net=host -v /var/run/docker.sock:/var/run/docker.sock cnrancher/autok3s:v0.9.3 serve --bind-address 0.0.0.0 --bind-port 9090
mengfanxi-hit commented 4 days ago

Have you also run Rancher on your host with the same port? The login UI is for Rancher. You can change the AutoK3s port and try again.

docker run -itd --restart=unless-stopped --net=host -v /var/run/docker.sock:/var/run/docker.sock cnrancher/autok3s:v0.9.3 serve --bind-address 0.0.0.0 --bind-port 9090

Thanks, I made a foolish mistake. I also had the Rancher UI open, which caused issues with port mapping.