Ingress Controller mode
How to install and configure the Traefik Hub agent in Ingress Controller mode.
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:
Login to Traefik Hub and select Create my first Traefik Hub agent.
Choose Traefik Hub as Ingress Controller (this is the default installation method) and follow the steps in the UI.
Once you're done, select Configuration Done.
You can tailor the default configuration by adjusting the default values and applying your custom settings with Helm.
This is an advanced topic!
||Stable set of replicated Pods running within a cluster at any given time.||1|
||The maximum number of Pods that can be created over the desired number of Pods.||1|
||Kubernetes resource management for Pods and containers.||64Mi|
||Kubernetes resource management for Pods and containers.||50m|
||Kubernetes resource management for Pods and containers.||128Mi|
||Kubernetes resource management for Pods and containers.||80m|
||Name of the Secret containing the Traefik Hub agent token.||hub-agent-token|
||Kubernetes Service types allow you to specify what kind of Service you want.||ClusterIP|
||For defining external DNS annotations.||None|
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 Traefik Hub as Ingress Controller and make sure to copy your token.
You only need the token shown at the bottom.
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
- Check out the tutorial section and get started with API management