8.1.1.3 Installing the Traefik Controller

Use Helm to install Traefik.

  1. Create a $WORKDIR/kubernetes/helm/traefik-ingress-values-override.yaml that contains the following:

    Note:

    The configuration below deploys an ingress using LoadBalancer. If you prefer to use NodePort, change the configuration accordingly. For more details about Traefik configuration see: Traefik Ingress Controller.Traefik Ingress Controller.
    ingressRoute:
      dashboard:
        enabled: true 
    providers:
      kubernetesCRD:
        enabled: true 
      kubernetesIngress:
        enabled: true
    ports:
      traefik:
        port: 9000
        exposedPort: 9000
        protocol: TCP
      web:
        port: 8000
        exposedPort: 30080
        nodePort: 30080
        protocol: TCP  
      websecure:
        port: 8443
        exposedPort: 30443
        nodePort: 30443
        protocol: TCP 
    service:
      spec:
        type: LoadBalancer
  2. To install and configure Traefik ingress issue the following command:
    $ helm install traefik --namespace <namespace> \
    --values traefik-ingress-values-override.yaml \
    traefik/traefik
    Where:
    • traefik is your deployment name
    • traefik/traefik is the chart reference

For example:

$ helm install --namespace traefik \
--values traefik-ingress-values-override.yaml \
traefik traefik/traefik