跳转至

快速开始

安装

  1. 添加helm源
helm repo add traefik https://traefik.github.io/charts
helm repo update
  1. 创建values.yaml
# values.yaml
ingressRoute:
  dashboard:
    enabled: true
    matchRule: Host(`dashboard.localhost`)  #改成 Host(`172.30.24.211`) 你的地址
    entryPoints:
      - web
providers:
  kubernetesGateway:
    enabled: true
gateway:
  listeners:
    web:
      namespacePolicy:
        from: All

如果没有dns,且你有LoadBalancer,很可能会出现traefik启动后,svc获取的地址和你这边写的不一样,会导致无法访问,可以启动以后看到地址了再更改并应用这个配置文件

  1. 安装
helm install traefik traefik/traefik -f values.yaml --wait --namespace traefik

验证

启动后访问matchRule指定的地址