- Getting Redis and Express to work together in a way that’s fool and future-proof, and reproducible across local and deployed environments, is slightly harder. That’s where Docker and Docker Compose come in. Docker is a containerisation system, Docker Compose is a way to define how multiple Docker containers interact.
- Redis (Remote Dictionary Server) is a very popular and widely-used open source, fast, distributed and efficient in-memory key-value database/data structure server. It offers a rich set of features that make it effective for a wide range of use cases: as a database, caching layer, message broker, or queue; applicable in web applications, chat and messaging applications, gaming, real-time data.
You can install Traefik with the following flavors:
Use the Official Docker Image¶
Choose one of the official Docker images and run it with one sample configuration file:
Install Redis Docker Command
For more details, go to the Docker provider documentation
Tip
- Prefer a fixed version than the latest that could be an unexpected version.ex:
traefik:v2.1.4
- Docker images are based from the Alpine Linux Official image.
- Any orchestrator using docker images can fetch the official Traefik docker image.
The standalone install is a simple tarball with a binary. It contains its own node.js binary and will autoupdate like the above install methods. To quickly setup into /usr/local/lib/heroku and /usr/local/bin/heroku, run this script (script requires sudo and not Windows compatible). Prefer a fixed version than the latest that could be an unexpected version. Ex: traefik:v2.1.4 Docker images are based from the Alpine Linux Official image.; Any orchestrator using docker images can fetch the official Traefik docker image.
Use the Helm Chart¶
Warning
The Traefik Chart from Helm's default charts repository is still using Traefik v1.7.
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.14+
- Helm version 3.x is installed
Add Traefik's chart repository to Helm:
You can update the chart repository by running:
And install it with the helm
command line:
Helm Features
All Helm features are supported.For instance, installing the chart in a dedicated namespace:
You can customize the installation by specifying custom values,as with any helm chart.
The values are not (yet) documented, but are self-explanatory:you can look at the default values.yaml
file to explore possibilities.
Install Redis Docker Image
You can also set Traefik command line flags using additionalArguments
.Example of installation with logging set to DEBUG
:
Exposing the Traefik dashboard¶
This HelmChart 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 :
Accessible with the url: 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
):
Use the Binary Distribution¶
Grab the latest binary from the releases page.
And run it:
Compile your Binary from the Sources¶
All the details are available in the Contributing Guide