Let me describe the situation what I faced today:
- I received NodeJS application image from Developers and published it to AKS(Azure Kubernetes Services)
There is nothing specific in manifest of this application, this is simple deployment with service on 80 port.
-
I have configured Ingress using helm package and installed common one from helm repo: stable/nginx-ingress . When it was installed - I have started to configure Ingress.
-
Below my yaml:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: app-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
rules:
- http:
paths:
- backend:
serviceName: ui-service
servicePort: 80
path: /(.*)
- backend:
serviceName: ui-service
servicePort: 80
path: /test-service/ui(/|$)(.*)
Okay, I'm trying to open page: http://1.2.3.4/ - everything works fine, I see web page which redirects me to:
http://1.2.3.4/page1 , in case of I clicked something - http://1.2.3.4/page2 etc.
However, when I'm trying to open the same web application using:
http://1.2.3.4/test-service/ui , I got blank page and errors in console:
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://1.2.3.4/test-services/ui/static/css/test.css".
What a difference that I found:
In the second case all JS and CSS files has content-type: text/html.
So, I'm a little bit stuck on this.
Aucun commentaire:
Enregistrer un commentaire