Skip to content

Ingress Controller mode

How to install and configure the Traefik Hub agent in Ingress Controller mode.


Introduction

Using the Traefik Hub UI is the preferred way (and most effortless) to install the Traefik Hub agent.

The UI will guide you through the installation process step-by-step.

The Helm chart will deploy the following components into your Kubernetes cluster:

  • Traefik Hub agent

Before you begin

Before you begin the installation process, it is recommended that you have a basic understanding of Kubernetes.

You should have access to a working Kubernetes cluster, either on a cloud provider or on your own infrastructure.

Please make sure that you have the following:


Install

Login to Traefik Hub and select Create my first Traefik Hub agent.

Choose install

Create the first Traefik Hub agent

Choose Traefik Hub as Ingress Controller (this is the default installation method) and follow the steps in the UI.

Ingress Controller mode

Traefik Hub as Ingress Controller

Once you're done, select Configuration Done.


Configuration

You can tailor the default configuration by adjusting the default values and applying your custom settings with Helm.

This is an advanced topic!

Default configuration

Parameter Description Default
replicas Stable set of replicated Pods running within a cluster at any given time. 1
maxSurge The maximum number of Pods that can be created over the desired number of Pods. 1
resources.requests.memory Kubernetes resource management for Pods and containers. 64Mi
resources.requests.cpu Kubernetes resource management for Pods and containers. 50m
resources.limits.memory Kubernetes resource management for Pods and containers. 128Mi
resources.limits.cpu Kubernetes resource management for Pods and containers. 80m
hubTokenSecretName Name of the Secret containing the Traefik Hub agent token. hub-agent-token
service.type Kubernetes Service types allow you to specify what kind of Service you want. ClusterIP
service.annotations For defining external DNS annotations. None

Custom configuration

First, login to the Traefik Hub UI to get the agent token.

Once you're logged in, select Create my first Traefik Hub agent.

Choose install

Create the first Traefik Hub agent

Choose Traefik Hub as Ingress Controller and make sure to copy your token.

You only need the token shown at the bottom.

Ingress Controller mode

Traefik Hub as Ingress Controller

Once you have your token copied and saved, continue with the steps to deploy the Traefik Hub agent.

Add the Helm repository

helm repo add traefik https://traefik.github.io/charts
helm repo update

Create the Kubernetes Namespace for Traefik Hub

kubectl create namespace traefik-hub

Create the secret with the agent token

kubectl create secret generic hub-agent-token --namespace traefik-hub --from-literal=token=$YOUR-AGENT-TOKEN
  • $YOUR-AGENT-TOKEN: Your token displayed in the UI

You can adjust the default configuration by adjusting the values.

Adjust the default values

First, save the default configuration.
The following command will save it to a file with the name values.yaml in your working directory.

helm show values traefik/traefik-hub > values.yaml

Second, adjust the file.
The following example shows a configuration where the log level of the Traefik Hub agent is set to DEBUG and the access log format to JSON.

additionalArguments:
  - --log.level=debug
  - --accessLog.format=json

Install the agent with your custom settings

Once you have the configuration adjusted to your needs, use Helm to deploy the Traefik Hub agent with the new values:

helm upgrade --install --namespace traefik-hub traefik-hub traefik/traefik-hub --values values.yaml

What's next

  • Check out the tutorial section and get started with API management