-
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
Text Streaming not working when using Nginx-Ingress on Kubernetes #11430
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-sigs/prow repository. |
Your nodes are on AWS and your curl destination is hostname But bigger problem is that the service created by the ingress-nginx controller is in a If streaming is broken, it can even be reproduced on a kind cluster or a minikube cluster. So please check the documentation about how to install run and use the ingress-nginx controller. Then try it on a kind cluster or a minikube cluster. Once you have it all figured out, then run the install with appropriate and preferably documented process. THen please edit this issue description and provide data that can be analyzed as a problem in the controller. Thanks /remove-kind bug |
Some clarificatons:
That's why I can use localhost:8000 as the curl destination. It is valid. The reason of testing using port-forwarding is that our service is exposed to Internet via CloudFlare Tunnel solution (and it's also the reason that the EXTERNAL-IP is in
The test scenarios are:
Thanks! |
I think you are providing info that helps but I don't know how to use it to reproduce the problem on a kind or a minikube cluster. Would you consider this #11162 (comment) as a valid text streaming test. If you are port-forwarding, then is it across the internet or within a lan. All such details are needed for me to reproduce. Critical info is a application docker image, of a small streaming server, that anyone can use on their own cluster to test. You are not providing the log messages of the controller pod that is logged when streaming fails. Maybe you should edit the issue description and ensure that there is enough info there that shows the small tiny details that are outputs of kubectl commands for describe and logs etc etc Since you showed chatGPT, I will pick some random app from artifacthub.io to test, unless you can provide a minimalistic app |
unable to find a app to use in test |
I enabled debug level log in nginx ingress controller, made a test and grabbed the log. Since there're quite a lot logs generated at debug level, there might be some other activities logged. Please check the log attached: test.log.tar.gz. Here're some highlights:
No error is logged during the test. What we can see from the client side is that the whole content of the response was received in one go, without streaming effect. I'll try to come up with a text streaming test that is reproducible in local environment. Thanks! |
Without knowing the app and the curl output of real use, its hard to understand why you think streaming is broken |
@Rainfarm How did you solve the problem? |
What happened:
We use Ngnix ingress controller in an EKS cluster, and the text streaming from the services running in the EKS cluster doesn't work, the client always get a response in one go. We've checked similar issues here (e.g., #10482, but the solutions suggested don't help).
Below are some details:
In the print out from curl command, we can see that the response has header of
transfer-encoding: chunked
:What you expected to happen:
The client should receive response in stream.
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
v1.9.6
Kubernetes version (use
kubectl version
):Client Version: v1.28.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.4-eks-036c24b
Environment:
uname -a
): 5.10.205-195.807.amzn2.x86_64Please mention how/where was the cluster created like kubeadm/kops/minikube/kind etc.
kubectl version
kubectl get nodes -o wide
helm ls -A | grep -i ingress
helm -n <ingresscontrollernamespace> get values <helmreleasename>
if you have more than one instance of the ingress-nginx-controller installed in the same cluster, please provide details for all the instances
Current State of the controller:
kubectl describe ingressclasses
kubectl -n <ingresscontrollernamespace> get all -A -o wide
kubectl -n <ingresscontrollernamespace> describe po <ingresscontrollerpodname>
kubectl -n <ingresscontrollernamespace> describe svc <ingresscontrollerservicename>
kubectl -n <appnamespace> get all,ing -o wide
kubectl -n <appnamespace> describe ing <ingressname>
Note: the ingress svc has been port-forwarded to local using: kubectl -n ingress-nginx port-forward svc/ingress-nginx-controller 8000:80
kubectl describe ...
of any custom configmap(s) created and in useHow to reproduce this issue:
Anything else we need to know:
I can confirm that the application's streaming behaviour is correct: if we port-forward the application's service and invoke API against the forwarded port, the stream works fine.
The text was updated successfully, but these errors were encountered: