ingress-nginx
ingress-nginx copied to clipboard
Page Distortion Issues for a .NET 4.8 WebForms AKS Applications based on a NGINX controller
Hello Team ,
What happened:
We have a issue in one of our .NET 4.8 Webforms AKS applications based on a Nginx load balancers which is added as an Web Application Routing Addon from Microsoft . The issue is that we observed that on the page load the images/icons/fonts/css etc . are not loading / or are distorted and on the developer console it gives an error - '502 Bad Gateway' .We have tried adding different sorts of nginx annotations to our ingress but none has helped so far and the issue still persists . Also , when the same application was deployed on application gateway there were no issues as such and the application was working fine . It has only happened when we migrated to Nginx for our AKS clusters .
What you expected to happen:
We think the issue has mostly happened post we migrated from app gateways to nginx load balancers and moreever issues are highly observed in ASP .NET 4.8 Web Forms applications.NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.): the version is 1.9.4
Kubernetes version (use kubectl version):
Environment:
-
Cloud provider or hardware configuration: Azure AKS
-
OS (e.g. from /etc/os-release):Widnows
-
Kernel (e.g.
uname -a): -
Install tools:
Please mention how/where was the cluster created like kubeadm/kops/minikube/kind etc.- it was created based on terraform
-
Basic cluster related info:
kubectl versionkubectl get nodes -o wide
-
How was the ingress-nginx-controller installed:
- If helm was used then please show output of
helm ls -A | grep -i ingress - If helm was used then please show output of
helm -n <ingresscontrollernamespace> get values <helmreleasename> - If helm was not used, then copy/paste the complete precise command used to install the controller, along with the flags and options used
- if you have more than one instance of the ingress-nginx-controller installed in the same cluster, please provide details for all the instances - helm was not used to configure this , it was configured by microsoft team as an addon .
- If helm was used then please show output of
-
Current State of the controller:
kubectl describe ingressclasseskubectl -n <ingresscontrollernamespace> get all -A -o widekubectl -n <ingresscontrollernamespace> describe po <ingresscontrollerpodname>kubectl -n <ingresscontrollernamespace> describe svc <ingresscontrollerservicename>
-
Current state of ingress object, if applicable:
kubectl -n <appnamespace> get all,ing -o widekubectl -n <appnamespace> describe ing <ingressname>- If applicable, then, your complete and exact curl/grpcurl command (redacted if required) and the reponse to the curl/grpcurl command with the -v flag
-
Others:
- Any other related information like ;
- copy/paste of the snippet (if applicable)
kubectl describe ...of any custom configmap(s) created and in use- Any other related information that may help
- Any other related information like ;
How to reproduce this issue:
Anything else we need to know:
I am attaching the developer console screenshot for the error as well for reference .
Request for your help and suggestions .
This issue is currently awaiting triage.
If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members by writing /triage accepted in a comment.
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 /triage needs-information
- Please click the button to create new bug report and look at he questions asked in the new issue template
- Please edit your issue description according to those questions and provide he information requested in the new issue template
Please post the ingress object you used to create this site. The path will matter; the controller needs to know how to reach the paths, like /images, /CSS, etc.
ingress-etravel_Ingress1.txt we have attached the ingress details , could you please help us investigate
Hi @strongjz,
@Abhishek2096 attached the ingress details ingress-etravel_Ingress1.txt , please help us investigate the issue.
Thanks.
Please fill out the template questions as well, it will help in troubleshooting.
Are you trying to do SSL pass through? more details https://kubernetes.github.io/ingress-nginx/user-guide/tls/#ssl-passthrough
If you hit the service directly does it work? https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: ingress-
labels:
ingress: ingress-
resource: ingress
annotations:
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
nginx.ingress.kubernetes.io/proxy-buffering: 'off'
nginx.ingress.kubernetes.io/proxy-connect-timeout: '600'
nginx.ingress.kubernetes.io/ssl-redirect: 'true'
nginx.ingress.kubernetes.io/use-regex: 'true'
spec:
ingressClassName: webapprouting.kubernetes.azure.com
defaultBackend:
service:
name: nodeport-web
port:
number: 443
tls:
- hosts:
-
secretName: cert-secret
rules:
- host:
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: nodeport-web
port:
number: 443
- path: /MobileApp
pathType: Prefix
backend:
service:
name: nodeport-mapp
port:
number: 443
- path: /App
pathType: Prefix
backend:
service:
name: nodeport-web
port:
number: 443
Hi Team ,
we have filled those details of the template which were applicable to us .
yes if we hit the service directly through port-forwarding it works and we dont see any port-forward issues . We are not using any SSL pass through here .
Please let us know if you need any more details .
Kindly help us .
Hi @strongjz, please find answers to your questions in the last comment above from Abhishek2096.
Thanks for your help.
if you can experiment, then
- change the ingress by adding the fqdn in the host field
- and also change the other specs as shown below
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: ingress-
labels:
ingress: ingress-
resource: ingress
spec:
ingressClassName: webapprouting.kubernetes.azure.com
defaultBackend:
service:
name: nodeport-web
port:
number: 443
tls:
- hosts:
-
secretName: cert-secret
rules:
- host:
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nodeport-web
port:
number: 443
- path: /MobileApp
pathType: Prefix
backend:
service:
name: nodeport-mapp
port:
number: 443
- then update status
- you have not answered the questions asked in the issue template so answer them
- explain where the actual content that is accessible under /images and /css lies
- what is your reasoning to access images/css/other with fqdn instead of just relative path
This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev on Kubernetes Slack.