Skip to content
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

Page Distortion Issues for a .NET 4.8 WebForms AKS Applications based on a NGINX controller #10952

Open
Abhishek2096 opened this issue Feb 1, 2024 · 10 comments
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@Abhishek2096
Copy link

Abhishek2096 commented Feb 1, 2024

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 version
    • kubectl 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 .
  • 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>
  • Current state of ingress object, if applicable:

    • kubectl -n <appnamespace> get all,ing -o wide
    • kubectl -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

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 .
error

Request for your help and suggestions .

@Abhishek2096 Abhishek2096 added the kind/bug Categorizes issue or PR as related to a bug. label Feb 1, 2024
@k8s-ci-robot
Copy link
Contributor

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.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority labels Feb 1, 2024
@longwuyuan
Copy link
Contributor

/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

@k8s-ci-robot k8s-ci-robot added triage/needs-information Indicates an issue needs more information in order to work on it. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. and removed kind/bug Categorizes issue or PR as related to a bug. labels Feb 1, 2024
@strongjz
Copy link
Member

strongjz commented Feb 1, 2024

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.

@Abhishek2096
Copy link
Author

ingress-etravel_Ingress1.txt
we have attached the ingress details , could you please help us investigate

@alaljase
Copy link

Hi @strongjz,

@Abhishek2096 attached the ingress details ingress-etravel_Ingress1.txt , please help us investigate the issue.

Thanks.

@strongjz
Copy link
Member

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

@Abhishek2096
Copy link
Author

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 .

@alaljase
Copy link

Hi @strongjz, please find answers to your questions in the last comment above from Abhishek2096.

Thanks for your help.

@longwuyuan
Copy link
Contributor

longwuyuan commented Feb 15, 2024

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

Copy link

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.

@github-actions github-actions bot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
Development

No branches or pull requests

5 participants