traefik入口:允许所有路径

我已经创建了这个IngressRoute

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: traefik-graylog
spec:
  entryPoints:
  - web
  routes:
  - kind: Rule
    match: Host(`graylog.localhost`)
    services:
    - name: graylog-web
      port: 9000

我可以到达它:

$ curl -I graylog.localhost
HTTP/1.1 200 OK

尽管如此,该网站正在尝试访问_/api,并吸引了我:

我们在连接到http://graylog.localhost/api/上运行的Graylog服务器时遇到问题。请验证服务器是否正常运行并且可以正常工作。

如您所见,这表明它无法访问_/api,其中_graylog.localhost

我想我需要修改IngressRoute,但我不太清楚需要更改什么。

我已经尝试过rule

routes:
    kind: Rule
    match: Host(`graylog.localhost`) && PathPrefix(`/*`)

但是,我无法到达根目录

curl graylog.localhost
404 page not found

有什么想法吗?

Amanda_0 回答:traefik入口:允许所有路径

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2642359.html

大家都在问