Login v2 pod not sending CUSTOM_REQUEST_HEADERS
Use-case: Kubernetes self-hosted proof-of-concept
Environment: Self-Hosting on EKS
Version: ghcr.io/zitadel/zitadel:v4.0.0
Stack: Zitadel UI v2
What you expected to happen: Zitadel UI for basic management login
What went wrong: Login v2 gets 400 error due to issue with Host header to zitadel API instance
Attachments:
On the
zitadel-login
pods I see the environment variable file is set:
cat /.env-file/.env
Testing from the CLI with curl and wget I can send host headers and get a 200 response.
However the pods logs show connection errors experienced when the CUSTOM_REQUEST_HEADERS
aren't sent.
2 Replies
Hi @Fidget, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question.
Answer
I wasn't able to find a direct answer in the documentation for your specific Kubernetes configuration issue, here are some relevant sources:
1. Set up Zitadel with Docker Compose : The Docker Compose documentation shows the
CUSTOM_REQUEST_HEADERS
environment variable being used with the login container, and mentions that if you can't use the network_mode service:zitadel, you can pass the environment variable CUSTOM_REQUEST_HEADERS=Host:localhost
instead (1) .
2. Discord message from @blackr4t on 2024-10-02 : A community discussion mentions that regardless of what header comes in, it will forward the domain as ZITADEL_API_URL without https://, and there's work in progress to make this configuration easier (2) .
Your issue appears to be related to network connectivity between the login container and the ZITADEL API service in your Kubernetes environment. The CUSTOM_REQUEST_HEADERS
configuration should help with host header forwarding, but the connection refused error suggests a networking issue rather than just header configuration.
Would you like me to help you with a general approach to troubleshooting this Kubernetes networking issue, or would you prefer to click the "Ask for help" button to have a team member review your specific setup?
To learn more, see the sources I considered:
[1] Set up Zitadel with Docker Compose
[2] Discord message from @blackr4t on 2024-10-02
Feel free to tag @Ask Inkeep with additional questions.I don't believe it's a connection refused due to being able to hit the same address:port combination with wget from the same pod container.
On login pod replicate connection error without host header
. /.env-file/.env && wget -q -O - "${ZITADEL_API_URL}"
On login pod show success with host header
. /.env-file/.env && wget -q -O - --header "${CUSTOM_REQUEST_HEADERS}" "${ZITADEL_API_URL}"