我正面临一个奇怪的问题...我正在尝试使用入口资源调用活动的 mq webui ...页面正在加载,但静态内容未加载,并且说找不到....
这是我的入口资源。
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: myingress
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
rules:
- http:
paths:
- path: /(.*).(jpg|jpeg|png|gif|ico|js|css|csv|json)$
backend:
serviceName: nginx-static
servicePort: 80
- path: "/"
backend:
serviceName: service1
servicePort: 8233
- path: "/test"
backend:
serviceName: server2
servicePort: 9002
http:
paths:
- path: "/admin"
backend:
serviceName: activemq-server
servicePort: 80
Kindly help how static content will be loaded....
将以下注释添加到入口配置文件:
nginx.ingress.kubernetes.io/add-base-url: "true"
nginx.ingress.kubernetes.io/rewrite-target: "specify rewriting rule here"
你可以在这里找到类似的问题:ingress-static-contetnt。