One-Line Installation of Traefik Enterprise Edition on Kubernetes¶
This page guides you through the installation of TraefikEE (Traefik Enterprise Edition) as a Kubernetes Ingress Controller.
Kubernetes Knowledge
Assistance with configuring or setting up a Kubernetes cluster are not included in this guide. If you need more information about Kubernetes, start with the following resources:
Requirements¶
-
The
traefikeectl
tool installed -
A Kubernetes cluster:
- Supported versions: 1.10, 1.11, 1.12 and 1.13
- RBAC enabled (recommended),
- Access to the Kubernetes API with
kubectl
, with the ability to create and manage namespaces and their resources. - A default
StorageClass
configured. TraefikEE usesStatefulSets
, and their storage requires a defaultStorageClass
to be configured. Instructions on doing so can be found here.
-
Helm:
- Supported versions: 2.9, 2.10, 2.11, 2.12, 2.13
- If a supported version is found,
traefikeectl
will use your helm binary. - If no helm installation is found,
traefikeectl
will download helm in a temporary folder. - If an unsupported version of helm is found,
traefikeectl
will not be able to work properly. You will have to upgrade/downgrade your helm installation to be able to use it.
- Bootstrap and control node pods can reach
https://v3.license.containous.cloud:8443
.
One-Line Installation¶
To install TraefikEE in Kubernetes, use the same traefikeectl install
command line
as described in the Getting Started with Installation page,
and add the option --kubernetes
to install TraefikEE in a Kubernetes cluster:
traefikeectl install \
--licensekey="XXXXXXXXX" \
--dashboard \
--kubernetes
Install a cluster with more than one Control Node
In order to install a TraefikEE cluster with more than one control node, specify the option --controlnodes=<NUMBER_OF_CONTROL_NODES>
in the command described above.
By default, the traefikeectl install
command line deploys a cluster with 1 Control Node and 2 Data Nodes.
To make this kind of install, run this command:
traefikeectl install \
--licensekey="XXXXXXXXX" \
--dashboard \
--kubernetes \
--controlnodes=3
The previous command installs TraefikEE on your Kubernetes infrastructure, with the following elements:
- A Control Plane for High Availability
- A Data Plane per Kubernetes worker node
- An Ingress Controller of type
traefik
is available, for an easy integration in your existing Kubernetes applications with on Ingress Rules - A routing configuration watching for Kubernetes API for ingress rules
All the available installation options are listed on the traefikeectl Reference Page.
Default Dashboard Password
By default, traefikeectl
will generate a new username and password to secure the dashboard.
For security reasons, this password is not stored anywhere, and is not recoverable if lost.
If you lose this username or password, you will have to recreate the secret that contains them.
Instructions on how to do this can be found here.
Customizing the One-Line Installation¶
The traefikeectl
tool uses Helm under the hood to assist with installing TraefikEE.
A custom values.yaml
file can be provided to traefikeectl
to further customize the installation.
To provide the following configuration:
- 10 Data Nodes (with 5
allowedUnavailable
) - Each node having limits at 500 Mb of memory and 1 vCPU
You would configure a values file:
replicas:
dataNode:
total: 10
allowedUnavailable: 4
resources:
requests:
memory: 500Mi
cpu: 100m
limits:
memory: 500Mi
cpu: 100m
Providing the custom values file to traefikeectl
can be done using the --kubernetes.helmvaluespath
argument:
traefikeectl install \
--licensekey="XXXXXXXXX" \
--dashboard \
--kubernetes \
--kubernetes.helmvaluespath=custom-values.yaml
Install a cluster with more than one Control Node
In order to install a TraefikEE cluster with more than one control node, add the option --controlnodes=<NUMBER_OF_CONTROL_NODES>
to the command described above.
By default, the traefikeectl install
command line deploys a cluster with 1 Control Node and 2 Data Nodes.
To make this kind of install, run this command:
traefikeectl install \
--licensekey="XXXXXXXXX" \
--dashboard \
--kubernetes \
--kubernetes.helmvaluespath=custom-values.yaml \
--controlnodes=3
The values that can be configured in this file are outlined in the Helm Chart Configuration Reference
Installation behind a proxy
In order to be able to install TraefikEE behind a proxy, you must provide the proxy.http
, proxy.https
and proxy.no_proxy
values in your custom-values.yaml
file.
As the control plane will make requests to the kubernetes API server, the proxy.no_proxy
field must contain its IP address.
It can be found using kubectl get service kubernetes
.
# ...
proxy:
http: http://127.0.0.1:3129
https: http://127.0.0.1:3129
no_proxy: 100.64.0.1
Validate Installation¶
Validate that the TraefikEE cluster is installed correctly:
traefikeectl list-nodes
Name Availability Role Leader
---- ------------ ---- ------
traefikee-control-node-1 ACTIVE CONTROL NODE YES
data-node-traefikee-data-node-68d856488c-5vx5n ACTIVE DATA NODE
data-node-traefikee-data-node-68d856488c-stgns ACTIVE DATA NODE
Name Availability Role Leader
---- ------------ ---- ------
traefikee-control-node-1 ACTIVE CONTROL NODE YES
data-node-traefikee-data-node-68d856488c-5vx5n ACTIVE DATA NODE
data-node-traefikee-data-node-68d856488c-stgns ACTIVE DATA NODE
traefikee-control-node-2 ACTIVE CONTROL NODE
traefikee-control-node-0 ACTIVE CONTROL NODE
Your TraefikEE for Kubernetes cluster is ready.
Backup your Installation¶
Don't forget to setup regular backups using the traefikeectl backup
command.
More information can be found in the backup and restore documentation.
Uninstall¶
The cluster can be easily uninstalled by running traefikeectl uninstall
:
traefikeectl uninstall
If you would like to purge the release entirely, and free up the namespace for future use, you can use:
traefikeectl uninstall --kubernetes.deletenamespace
Important
By default, traefikeectl
will use your kubeconfig file in the $KUBECONFIG
environment variable or in ~/.kube/config
.
You can override those values using the --kubernetes.configpath
argument in the command line.
More information about the uninstall options can be found on the traefikeectl Reference Page.