I am trying to install pgAdmin (image: 'dpage/pgadmin4:6.21') in Azure AKS. I am able to access the application when I use a Kubernetes LoadBalancer service, but when I use an Azure Application Gateway with Ingress, the login page is displayed without an issue. However, after login, it gets stuck on the loading page.
When I checked the browser console, I found the following error:
Refused to execute script from 'https://somedomain.xyz.cloudapp.azure.com/pgadmin4/login?next=%2Fpgadmin4%2Fbrowser%2F' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
I am almost certain that the issue is not related to the pgAdmin installation as it is already working with the Kubernetes LoadBalancer service. I have found some workarounds to get rid of the loading page by adding some lines in the pgAdmin scripts (as it assumes pgAdmin has a bug), but I have been unsuccessful in implementing these workarounds.
I have also tried changing the Ingress configuration without any success. Is there any recommendation or a way to trace the issue and find the root cause?"
ingress implementation :
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pgadmin-ingress
annotations:
kubernetes.io/ingress.class: azure/application-gateway
appgw.ingress.kubernetes.io/ssl-redirect: "false"
appgw.ingress.kubernetes.io/appgw-ssl-certificate: "devaks-cert"
appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
spec:
rules:
- http:
paths:
- path: /pgadmin4/*
pathType: ImplementationSpecific
backend:
service:
name: pgadmin
port:
number: 80