我正在尝试使用Docker中的Traefik反向代理来设置一个示例应用程序。
我在这个项目中使用,它与Traefik.v1.0有很大的不同。
这是我的docker-compose.yml文件:
version: '3'
services:
traefik:
# The official v2 Traefik docker image
image: traefik:v2.2
# Enables the web UI and tells Traefik to listen to docker
command:
- --api.ins
我在使用Kubernetes中的traefik 2.9在http和https上公开服务时遇到了困难。http端点有点工作,我在尝试添加https时以某种方式引入了CORS错误,但这不是我关心的主要问题。https入口被破坏了,我找不到任何迹象表明它为什么不能工作。traefik没有记录任何错误,dotnet服务也没有接收到请求。同时,这两条路由都会出现在仪表板中,websecure显示为启用了TLS。
不包括ClusterRole、ServiceAccount和ClusterRoleBinding,因为我认为这是正确的配置,因为http路由如果没有正确配置就不能工作。
Traefik配置:
k