Traefik is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease.
The Traefik Helm chart is focused on Traefik deployment configuration.
To keep this Helm chart as generic as possible we tend to avoid integrating any third party solutions nor any specific use cases.
Accordingly, the encouraged approach to fulfill your needs:
- Override the default Traefik configuration values (yaml file or cli)
- Append your own configurations (
kubectl apply -f myconf.yaml
)
Examples of common usage are provided.
If needed, one may use extraObjects
or extend this
Helm chart as a subchart.
Starting with v28.x, this chart now bootstraps Traefik Proxy version 3 as a Kubernetes ingress controller,
using Custom Resources IngressRoute
.
For upgrading from chart versions prior to v28.x (using Traefik Proxy version 2), see
- Migration guide from v2 to v3
- upgrade notes in the
README
on the v27 branch.
Starting with v34.x, to work around Helm caveats, it's possible to use an additional Chart dedicated to CRDs: traefik-crds. See also the deploy instructions below.
It's possible to use this chart with Traefik Proxy v2 using chart version v27.x.
This chart support policy is aligned
with upstream support policy of Traefik Proxy.
You can check the README
on the v27 branch
for compatibility, installation instructions and older upgrade notes.
- Kubernetes (server) version v1.22.0 or higher:
kubectl version
- Helm v3.9.0 or higher installed:
helm version
- Traefik's chart repository:
helm repo add traefik https://traefik.github.io/charts
helm install traefik traefik/traefik
or:
helm install traefik oci://ghcr.io/traefik/helm/traefik
You can customize the install with a values
file. There are some EXAMPLES provided.
Complete documentation on all available parameters is in the default file.
helm install -f myvalues.yaml traefik traefik/traefik
The CRD chart is an additional and optional Chart. When using it, the CRDs of regular Traefik Chart are not required. See here for more details
helm install traefik-crds traefik/traefik-crds
helm install traefik traefik/traefik --skip-crds
helm list # should display two charts installed
One can check what has changed in the Changelog.
New major version indicates that there is an incompatible breaking change.
Warning
Please read carefully release notes of this chart before upgrading.
When using Helm native management for CRDs, user MUST upgrade CRDs before calling helm upgrade command. CRDs are not updated by Helm. See HIP-0011 for details.
# Update repository
helm repo update
# See current Chart & Traefik version
helm search repo traefik/traefik
# Update CRDs
helm show crds traefik/traefik | kubectl apply --server-side --force-conflicts -f -
# Upgrade Traefik
helm upgrade traefik traefik/traefik
Warning
When upgrading from standard installation to the one with additional CRDs chart, you have to change ownership on CRDs before installing CRDs chart
# Update repository
helm repo update
# Update CRDs ownership
kubectl get customresourcedefinitions.apiextensions.k8s.io -o name | grep traefik.io | xargs kubectl patch --type='json' -p='[{"op": "add", "path": "/metadata/labels", "value": {"app.kubernetes.io/managed-by":"Helm"}},{"op": "add", "path": "/metadata/annotations/meta.helm.sh~1release-name", "value":"traefik-crds"},{"op": "add", "path": "/metadata/annotations/meta.helm.sh~1release-namespace", "value":"default"}]'
# If you use gateway API, you might also want to change Gateway API ownership
kubectl get customresourcedefinitions.apiextensions.k8s.io -o name | grep gateway.networking.k8s.io | xargs kubectl patch --type='json' -p='[{"op": "add", "path": "/metadata/labels", "value": {"app.kubernetes.io/managed-by":"Helm"}},{"op": "add", "path": "/metadata/annotations/meta.helm.sh~1release-name", "value":"traefik-crds"},{"op": "add", "path": "/metadata/annotations/meta.helm.sh~1release-namespace", "value":"default"}]'
# Deploy optional CRDs chart
helm install traefik-crds traefik/traefik-crds
# Upgrade Traefik
helm upgrade traefik traefik/traefik
# Update repository
helm repo update
# See current Chart & Traefik version
helm search repo traefik/traefik
# Update CRDs (Traefik Proxy v3 CRDs)
helm upgrade traefik-crds traefik/traefik
# Upgrade Traefik
helm upgrade traefik traefik/traefik
If you want to contribute to this chart, please read the Contributing Guide.
Thanks to all the people who have already contributed!