-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
ingress-nginx is adding HTTP_ prefix to all the request headers #10581
Comments
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/remove-kind bug |
Hello @longwuyuan , Thanks for looking into the issue and for quick response. After comparing with other technologies I found that webpy was adding HTTP_ prefix in the header and was returning the headers back to the client. Apologies for the issue created but seems like the issue is not valid. For the record I am attaching response of headers implemented by different technologies
It turns out that different implementation interprets headers differently and because of behaviour of WebPY framework I doubted the ingress controller. Thanks a lot for the quick resposne. |
🙏 |
What happened:
Hello,
I tried to setup a kubernetes cluter with ingress-nginx ingress controller.
the ingress controller comes packaged with Microk8s installer and is enabled as a Microk8s plugin.
the issue that I am facing is that all the request header which are send from outside world to the upstream backend endpoints have
HTTP_
prefix attached.I have created an echoserver app which acts as an endpoint and returns the request headers that it receives, and following is the response
What you expected to happen:
Expected behaviour is that request headers should not be tampered and no prefix should be added to request header
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
bash-5.1$ /nginx-ingress-controller --version
Kubernetes version (use
kubectl version
):Environment:
Cloud provider or hardware configuration: 16GB Ram 100GB SSD 8CPU
OS (e.g. from /etc/os-release): Debian GNU/Linux 11 (bullseye)
Kernel (e.g.
uname -a
): Linux rohannode 6.1.22generic Basic structure #1 SMP PREEMPT_DYNAMIC Wed Apr 12 19:17:46 UTC 2023 x86_64 GNU/LinuxInstall tools: Microk8s
Please mention how/where was the cluster created like kubeadm/kops/minikube/kind etc.
Basic cluster related info:
kubectl version
How was the ingress-nginx-controller installed:
sudo microk8s enable ingress
Current State of the controller:
kubectl describe ingressclasses
kubectl -n <ingresscontrollernamespace> get all -o wide
kubectl -n <ingresscontrollernamespace> describe po <ingresscontrollerpodname>
How to reproduce this issue:
As minimally and precisely as possible. Keep in mind we do not have access to your cluster or application.
Help up us (if possible) reproducing the issue using minikube or kind.
Install Microk8s
Install the ingress controller
sudo microk8s enable ingress
Install an application that will act as default backend (is just an echo app)
kubectl apply -f echoserver.yaml
Content of echoserver.yaml is as follows
make a request
The echoserver returns the headers as part of resposne.
Please note that the headers passed in curl request is theKey, however in resposne we get
HTTP_THEKEY
, which should betheKey
The text was updated successfully, but these errors were encountered: