[Support]: 502 Bad Gateway in Kubernetes with Traefik ingress but working as NodePort #19798
-
Describe the problem you are havingI am trying to install Frigate on my Kubernetes cluster with a minimal configuration. I can successfully access Frigate if I expose the Kubernetes Service as a NodePort service. Frigate works without any issues at all. However, I cannot access Frigate through a Kubernetes Ingress resource. When browsing to the URL, on the first access I receive some HTML assets (fonts, CSS, ...) but after this one request all others return I have enabled debug logging but nothing at all sticks out. Interestingly, I can always load the favicon and see the request being logged. All requests afterwards are not even logged in Frigate. It looks like the Traefik serving as the ingress controller to my cluster already shuts down the request and returns 502 but I don't see any relevant logs in Traefik either.
Even weirder is that with the same configuration I can put a Traefik proxy running on my local machine in front of the NodePort service and Frigate works as well. Does anyone have an idea on why this could happen and what configuration I need to change for this to work? Version0.16.0 What browser(s) are you using?No response Frigate config file# default configuration
tls:
enabled: false
mqtt:
enabled: false Relevant Frigate log outputN/A Relevant go2rtc log outputN/A FFprobe output from your cameraN/A Frigate statsNo response Install methodDocker Compose docker-compose file or Docker CLI commandusing Helm chart Object DetectorCoral Network connectionWired Camera make and modelN/A Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
A 502 Bad Gateway when using Traefik as an ingress for Frigate, but not when using NodePort, suggests an issue with how the reverse proxy is set up to forward requests to Frigate. Frigate expects to be accessed on its authenticated UI/API port (default: 8971) when behind a reverse proxy(1)(2). You should ensure that:
You can find more details and example proxy configurations (including for Traefik) in the official guide: Setting up a reverse proxy(2). 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
In case someone stumbles upon the same error: I have a dual-stack enabled cluster and the If I want to enable IPv6, I need to overwrite the entire |
Beta Was this translation helpful? Give feedback.
In case someone stumbles upon the same error: I have a dual-stack enabled cluster and the
ipFamilyPolicy
is set toPreferDualStack
for most of my services. Frigate does not support IPv6 out of the box. Setting this toSingleStack
resolves the issue!If I want to enable IPv6, I need to overwrite the entire
listen.gotmpl
file as per https://docs.frigate.video/configuration/advanced/#enabling-ipv6, right?