Headlamp port-forward works locally but returns 404 through a hostname

August 3, 2026 2 answers
Asked by BUDGET_meeting
I can port-forward Headlamp and access it locally, but trying to open it through my hosts-file entry still returns a 404. I've tried both http://headlamp.my.local and the forwarded address on port 8080. The hostname points to my Raspberry Pi, and I'm wondering whether the port-forward is only listening on localhost or whether my ingress configuration is incorrect.

Answers

pickle jar lid
kubectl port-forward normally binds only to localhost, so start by testing http://127.0.0.1:8080 or http://localhost:8080 on the machine running the command. A 192.168.x.x address wonโ€™t work from another device unless the port-forward is explicitly bound to that interface. For remote access, expose Headlamp through a Service and Ingress instead of relying on kubectl port-forward.

BUDGET_meeting: I added the Raspberry Piโ€™s address and the hostname from the example to my hosts file, but Iโ€™ll test localhost directly and check how the port-forward is bound.

Reply to this answer
~1984 archive
This may be an ingress or routing issue rather than a Headlamp issue. Check that the ingress points to the correct Headlamp service and port, and verify that the hostname youโ€™re using matches the ingress rule. An ingress diagnostic tool can also check the namespace, service, port, and URL configuration for you.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions