Project: Traefik (Orchestration & Management / API Gateway)
File: install-traefik.md

title: "Traefik Installation Documentation" description: "There are several flavors to choose from when installing Traefik Proxy. Get started with Traefik Proxy, and read the technical documentation." You can install Traefik with the following flavors: Choose one of the and run it with one sample configuration file: ```shell docker run -d -p 8080:8080 -p 80:80 \ -v $PWD/traefik.yml:/etc/traefik/traefik.yml traefik:v3.0 ``` For more details, go to the !!! tip Prefer a fixed version than the latest that could be an unexpected version. ex: `traefik:v3.0` Docker images are based from the . Any orchestrator using docker images can fetch the official Traefik docker image. !!! warning The Traefik Chart from is still using . Traefik can be installed in Kubernetes using the Helm chart from <https://github.com/traefik/traefik-helm-chart>. Ensure that the following requirements are met: Kubernetes 1.16+ Helm version 3.9+ is Add Traefik Labs chart repository to Helm: ```bash helm repo add traefik https://traefik.github.io/charts ``` You can update the chart repository by running: ```bash helm repo update ``` And install it with the Helm command line: ```bash helm install traefik traefik/traefik ``` !!! tip "Helm Features" All are supported. Examples are provided . For instance, installing the chart in a dedicated namespace: ```bash tab="Install in a Dedicated Namespace" kubectl create ns traefik-v2 helm install --namespace=traefik-v2 \ traefik traefik/traefik ``` ??? example "Installing with Custom Values" You can customize the installation by specifying custom values, as with . {: #helm-custom-values } All parameters are documented in the default . You can also set Traefik command line flags using `additionalArguments`. Example of installation with logging set to `DEBUG`: ```bash tab="Using Helm CLI" helm install --namespace=traefik-v2 \ --set="additionalArguments={--log.level=DEBUG}" \ traefik traefik/traefik ``` ```yml tab="With a custom values file" additionalArguments: "--log.level=DEBUG" ``` This Helm chart does not expose the Traefik dashboard by default, for security concerns. Thus, there are multiple ways to expose the dashboard. For instance, the dashboard access could be achieved through a port-forward: ```shell kubectl port-forward $(kubectl get pods --selector "app.kubernetes.io/name=traefik" --output=name) 9000:9000 ``` It can then be reached at: `http://127.0.0.1:9000/dashboard/` Another way would be to apply your own configuration, for instance, by defining and applying an IngressRoute CRD (`kubectl apply -f dashboard.yaml`): ```yaml apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: dashboard spec: entryPoints: web routes: match: Host(`traefik.localhost`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`)) kind: Rule services: name: api@internal kind: TraefikService ``` Grab the latest binary from the page. ??? info "Check the integrity of the downloaded file" ```bash tab="Linux" sha256sum ./traefik${traefikversion}linux${arch}.tar.gz ``` ```bash tab="macOS" shasum -a256 ./traefik${traefikversion}darwinamd64.tar.gz ``` ```powershell tab="Windows PowerShell" Get-FileHash ./traefik${traefikversion}windows${arch}.zip -Algorithm SHA256 ``` ??? info "Extract the downloaded archive" ```bash tab="Linux" tar -zxvf traefik${traefikversion}linux${arch}.tar.gz ``` ```bash tab="macOS" tar -zxvf ./traefik${traefikversion}darwinamd64.tar.gz ``` ```powershell tab="Windows PowerShell" Expand-Archive traefik${traefikversion}windows${arch}.zip ``` And run it: ```bash ./traefik --help ``` All the details are available in the {!traefik-for-business-applications.md!}