Ingress

traefik.ingress.kubernetes.io/router.entrypoints: ep1,ep2
    入口点
traefik.ingress.kubernetes.io/router.middlewares: auth@file,default-prefix@kubernetescrd
    中间件
traefik.ingress.kubernetes.io/router.priority: "42"
    优先级
traefik.ingress.kubernetes.io/router.pathmatcher: Path
    路径的默认路由器规则类型。只能指定与路径相关的匹配器名称
    Path或者PathPrefix(默认)
traefik.ingress.kubernetes.io/router.tls
    tls
traefik.ingress.kubernetes.io/router.tls.certresolver
    证书解析器
traefik.ingress.kubernetes.io/router.tls.domains.n.main
    tls域名
traefik.ingress.kubernetes.io/router.tls.domains.n.sans
    tls域名
traefik.ingress.kubernetes.io/router.tls.options: foobar@file
    tls选项

Service


traefik.ingress.kubernetes.io/service.nativelb: "true"
    在创建负载均衡器时,控制LB的子节点是直接为Pod IP,还是唯一的子节点为Kubernetes Service clusterIP。Kubernetes服务本身对Pod进行负载平衡。请注意,默认情况下,Traefik出于性能目的重用与后端建立的连接。这可能会阻止在设置选项时,副本之间的请求负载平衡表现得像预期的那样。默认情况下,NativeLB为false。


traefik.ingress.kubernetes.io/service.nodeportlb: "true"
    在创建负载均衡器时,当服务类型为nodePort时,控制LB的子节点是否直接是使用nodePort的节点内部IP。它允许在Traefik从Kubernetes集群外部运行但在同一节点网络内时访问服务。默认情况下,NodePortLB为false。

traefik.ingress.kubernetes.io/service.serversscheme: h2c
    覆盖默认方案
traefik.ingress.kubernetes.io/service.serverstransport: foobar@file
     Servers  Transport
traefik.ingress.kubernetes.io/service.passhostheader: "true"
    传递主机标头
traefik.ingress.kubernetes.io/service.sticky.cookie: "true"
traefik.ingress.kubernetes.io/service.sticky.cookie.name: foobar
traefik.ingress.kubernetes.io/service.sticky.cookie.secure: "true"
traefik.ingress.kubernetes.io/service.sticky.cookie.samesite: "none"
traefik.ingress.kubernetes.io/service.sticky.cookie.httponly: "true"
    httponly
traefik.ingress.kubernetes.io/service.sticky.cookie.maxage: 42
    cookie.maxage
  • redirect的跳转说明
    使用中间件
    将客户端重定向到其他方案/端口

https://doc.traefik.io/traefik/middlewares/http/redirectscheme/
https://doc.traefik.io/traefik/middlewares/http/redirectregex/