1.添加helm仓库
[root@master231 traefik]# helm repo add traefik https://traefik.github.io/charts
2.更新仓库
[root@master231 traefik]# helm repo update
3.拉取chart
[root@master231 traefik]# helm pull traefik/traefik
[root@master231 traefik]# tar xf traefik-23.1.0.tgz
4.修改svc的类型,将默认的LoadBalancer改为NodePort
[root@master231 traefik]# vim traefik/values.yaml
...
service:
...
# type: LoadBalancer
type: NodePort
5.安装traefik
[root@master231 traefik]# helm install oldboyedu-traefik traefik
6.暴露traefik的dashboard
[root@master231 traefik]# kubectl port-forward $(kubectl get pods --selector "app.kubernetes.io/name=traefik" --output=name) 9000:9000 --address 0.0.0.0
7.访问dashboard
http://10.0.0.231:9000/dashboard/#/
参考链接:
https://doc.traefik.io/traefik/getting-started/install-traefik/#use-the-helm-chart