Table of contents
No headings in the article.
To setup Traefik Ingress Controller locally follow the below steps:
- Setup a kind cluster (follow the below article)
- Install Helm Package Manager
helm version version.BuildInfo{Version:"v3.3.4", GitCommit:"a61ce5633af99708171414353ed49547cf05013d", GitTreeState:"clean", GoVersion:"go1.14.9"}
Run below command to confirm the helm version - Add official helm repo for Traefik
helm repo add traefik https://helm.traefik.io/traefik helm repo update
- Create 'traefik' Namespace
kubectl create namespace traefik namespace/traefik created
- Helm Install Traefik Charts
To configure the Traefik Helm chart, you can specify certain values.
For more details on configuration, please review the Traefik docs.
Run k8s command to review the installhelm install --namespace=traefik --set="additionalArguments={--log.level=DEBUG}" traefik traefik/traefik NAME: traefik LAST DEPLOYED: Tue Aug 23 10:43:09 2022 NAMESPACE: traefik STATUS: deployed REVISION: 1 TEST SUITE: None
kubectl get all -n traefik NAME READY STATUS RESTARTS AGE pod/traefik-7775d6554-lnnbs 1/1 Running 0 40s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/traefik LoadBalancer 10.96.130.104 <pending> 80:31306/TCP,443:30216/TCP 40s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/traefik 1/1 1 1 40s NAME DESIRED CURRENT READY AGE replicaset.apps/traefik-7775d6554 1 1 1 40s
- Expose the Traefik dashboard
You can access the traefik dashboard through port forwarding
Once done, You can access the Traefik Dashboard via: 127.0.0.1:9000/dashboardkubectl port-forward $(kubectl get pods --selector "app.kubernetes.io/name=traefik" --output=name -n traefik) 9000:9000 -n traefik Forwarding from 127.0.0.1:9000 -> 9000 Forwarding from [::1]:9000 -> 9000 Handling connection for 9000 Handling connection for 9000 Handling connection for 9000 Handling connection for 9000 Handling connection for 9000 Handling connection for 9000
Reference: