Containers

Traefik 3.8 Upgrade: Breaking Changes, Yaegi v2 and Helm Test

Most clusters can move to Traefik 3.8 with a plain chart upgrade, but four groups of users have to change something first. You need to act if your plugin Middlewares carry strings that start with urn:k8s:configmap:, if any BasicAuth user has a password longer than 1024 bytes, if your Helm values still use the old logs.general keys, or if you run the Gateway API provider at all, because its CRDs, listener TLS options and RBAC all change. Everyone else gets a few new warnings in the log, and in our test nothing else broke routing.

Original content from computingforgeeks.com - post 199941

We took a k3s cluster running the old chart 30 pin (the one that still ships Traefik 3.1, which is what our Traefik ingress controller install guide produces) and upgraded it to chart 43 with a plugin, a BasicAuth route and a deprecated ServersTransport in place. Every breaking change below was reproduced before and after the upgrade. I ran through this on Ubuntu 24.04 with k3s 1.37 at the end of November 2026, a week after Traefik 3.8.0 shipped, and the upgrade path works end to end.

Who has to change something before upgrading to Traefik 3.8?

The table maps the main changes in the official v3.8.0 migration guide to the setup they hit and to what we saw on the lab cluster. Read down the “Who is affected” column first. If none of the rows describe your cluster, you can jump straight to the CRD and Helm steps and expect a quiet upgrade.

ChangeWho is affectedWhat we saw in the lab
Plugin strings urn:k8s:configmap:<name>:<key> are resolvedPlugin Middlewares on the Kubernetes CRD providerValue replaced by the ConfigMap key; a missing key or malformed URN drops the Middleware and the router returns 404
BasicAuth rejects passwords over 1024 bytesAnyone using long generated passwords or tokens as BasicAuth passwords1100-byte password went from 200 to 401, nothing in the log
peerCertURI deprecated for peerCertSANsServersTransport and ServersTransportTCP with SAN pinningWRN line at startup, still works
Gateway API CRDs move to v1.7.0, TCPRoute is v1Gateway API provider usersCRDs upgraded cleanly, TCPRoute v1alpha2 no longer served
HTTPS Gateway listeners get their own TLS optionsGateway provider users who harden TLS in the default TLS optionNot exercised; per the guide, default no longer applies to those listeners
Listeners with filters need experimentalChannelGateway provider users with listener filtersNot exercised; per the guide, such a listener is not accepted otherwise
Chart 41+ renamed logs.general to logAnyone jumping from a chart older than 41helm upgrade refused by the values schema
Yaegi v2 plugin runtimeNobody by default, it is opt-inPlugin loaded with Yaegi v2 when the flag was set

The migration guide also lists three changes we did not exercise on this cluster. They matter only if your routes use these features, so check them against your own IngressRoutes and Ingress objects.

  • sanitizePath resolves dot and empty segments that carry ; parameters (/foo/..;bar/baz becomes /baz)
  • Host(`**.example.com`) matches nested subdomains, and ACME refuses it
  • Ingress-NGINX provider: TLS options apply per host, so default no longer covers Ingress hosts

Of the three, the path change is the one to test with real traffic. A request such as /foo/..;bar/baz used to reach the backend with that path and now arrives as /baz, so it may match another route. Normal segments like /foo;jsessionid=x/bar are not touched. The path change, the Ingress-NGINX TLS change and the BasicAuth limit also shipped in 3.7.18, so a recent 3.7 cluster already has them.

Step 1: Record the current release and its values

Before touching anything, we save the values the release was installed with and note its revision number. The revision is what helm rollback needs later, and the values file is what you will edit for the new chart. On our cluster the release lives in the traefik namespace, which is the layout most Helm installs use. Our k3s server runs with --disable=traefik; if yours still runs the Traefik that k3s bundles in kube-system, that copy moves with k3s releases and is tuned through a HelmChartConfig, so do not helm upgrade it by hand.

helm history traefik -n traefik
helm get values traefik -n traefik -o yaml > values-3.1.yaml

The baseline in our lab was chart 30.0.2 with the plugindemo plugin registered and the dashboard IngressRoute switched on. This is the values file it was installed with, and it is the file that breaks in Step 5:

experimental:
  plugins:
    demo:
      moduleName: github.com/traefik/plugindemo
      version: v0.2.2
ingressRoute:
  dashboard:
    enabled: true
logs:
  general:
    level: INFO

To compare behaviour before and after, we used a small test script against two hosts. whoami.example.com sits behind the plugin Middleware, and secure.example.com sits behind BasicAuth with one short and one 1100-byte password. The whoami app, the Middlewares and the IngressRoutes are ordinary manifests; the Secret behind BasicAuth was built with these commands, using a SHA1 entry so the hash covers all 1100 bytes:

LONG=$(head -c 1100 /dev/zero | tr "\0" "a"); echo "$LONG" > "$HOME/longpass"
H1=$(openssl passwd -apr1 "shortpass123")
H2="{SHA}$(echo -n "$LONG" | openssl dgst -sha1 -binary | base64)"
printf "admin:%s\nlongpw:%s\n" "$H1" "$H2" > /tmp/users
kubectl -n demo create secret generic auth-users --from-file=users=/tmp/users --dry-run=client -o yaml | kubectl apply -f -

We tried openssl passwd -apr1 for the long user first, and it printed Warning: truncating password to 256 characters, so that hash would never match a 1100-byte password. The test script itself is optional; create it with vim tests.sh and adjust the hostnames to your own routes. It curls 127.0.0.1 because k3s’s ServiceLB binds port 80 on the node; elsewhere, point it at your load balancer address:

#!/bin/bash
LONG=$(cat "$HOME/longpass")
echo "== traefik version"; kubectl -n traefik get deploy traefik -o jsonpath="{.spec.template.spec.containers[0].image}{\"\n\"}"
echo "== plugin header (whoami.example.com)"; curl -s -H "Host: whoami.example.com" http://127.0.0.1/ | grep -iE "^(X-Demo|HTTP|Host)" ; curl -s -o /dev/null -w "status %{http_code}\n" -H "Host: whoami.example.com" http://127.0.0.1/
echo "== basicauth short password"; curl -s -o /dev/null -w "status %{http_code}\n" -u admin:shortpass123 -H "Host: secure.example.com" http://127.0.0.1/
echo "== basicauth 1100-byte password"; curl -s -o /dev/null -w "status %{http_code}\n" -u "longpw:$LONG" -H "Host: secure.example.com" http://127.0.0.1/

On the old release the plugin passes the ConfigMap string through untouched, so the response carries the literal urn:k8s:configmap:demo-headers:greeting as a header value. Both BasicAuth users get a 200, including the one with the 1100-byte password:

Traefik v3.1.0 baseline: plugin header shows the literal urn:k8s:configmap string and the 1100-byte password returns 200

Keep this output. It is the reference you compare against once the new pods are running, and it is how you spot a behaviour change that the migration guide describes in a single sentence.

Step 2: Rename the chart values that chart 43 rejects

Chart 43 is the first chart that ships Traefik 3.8, and it validates your values against a JSON schema. Any key the schema does not know stops the upgrade before a single object changes. We diffed the top-level keys of chart 30.0.2 and chart 43.0.0 to see what an old values file would trip over:

helm show values traefik/traefik --version 30.0.2 > chart-30.yaml #https://github.com/traefik/traefik-helm-chart/releases
helm show values traefik/traefik --version 43.0.0 > chart-43.yaml #https://github.com/traefik/traefik-helm-chart/releases
diff <(grep -E "^[a-zA-Z]" chart-30.yaml | cut -d: -f1 | sort) <(grep -E "^[a-zA-Z]" chart-43.yaml | cut -d: -f1 | sort)

The lines that matter for an existing values file are the renames, shown with < for the old chart and > for the new one.

5c7
< certResolvers
---
> certificatesResolvers
15c19
< globalArguments
---
> global
23c28
< logs
---
> log

The log rename came in chart 41.0.0, and its release notes list every key that moved. Which of these does your values file still use?

  • logs.general becomes log
  • logs.access becomes accessLog
  • Filter keys go camelCase, statuscodes becomes statusCodes
  • providers.file.content is an object, not a string

Our fixed values file only needed the log block moved, because it never set access logs or a file provider. This is the version we upgraded with.

experimental:
  plugins:
    demo:
      moduleName: github.com/traefik/plugindemo
      version: v0.2.2
ingressRoute:
  dashboard:
    enabled: true
log:
  level: INFO

Save it as values-3.8.yaml. If your file also sets certResolvers or globalArguments, look up the new key names in the chart-43.yaml you saved above and move those blocks too, because the schema rejects them the same way. globalArguments is not a one to one rename: custom flags you kept there belong in additionalArguments. Our diff also showed podSecurityPolicy removed. The schema only catches keys it does not know, so a jump across many majors still means reading the breaking changes in every chart release you skip.

Step 3: Apply the Traefik 3.8 CRDs

Helm installs CRDs from a chart’s crds/ directory on the first install only and never upgrades them. The new peerCertSANs field, the tap middleware and the buffering options all live in updated CRDs, so we apply them by hand with server-side apply before the upgrade. The chart README uses exactly this command:

helm repo update
helm show crds traefik/traefik --version 43.0.0 | kubectl apply --server-side --force-conflicts -f - #https://github.com/traefik/traefik-helm-chart/releases

All 25 Traefik and Traefik Hub CRDs came back as serverside-applied. Check that the new field is in the schema before you move on, because a ServersTransport using peerCertSANs is rejected by an old CRD:

kubectl explain serverstransport.spec.peerCertSANs

On our cluster it printed FIELD: peerCertSANs <[]Object> with type and value subfields. The --force-conflicts flag matters on clusters where Helm or an older kubectl apply owns the CRD fields; without it the apply stops on field manager conflicts.

Step 4: Move the Gateway API CRDs to v1.7.0

Traefik 3.8 targets Gateway API v1.7.0. In that bundle TCPRoute is part of the Standard channel at v1, so you no longer need experimentalChannel to route TCP, and the v1alpha2 versions are not served anymore. The chart no longer ships Gateway API CRDs, so if you run the Gateway provider, updating them is your job. Skip this step if you do not use the Gateway provider and nothing else on the cluster needs v1.7.0. First check which bundle the cluster has and who manages it:

kubectl get crd tcproutes.gateway.networking.k8s.io -o jsonpath='{.metadata.annotations.gateway\.networking\.k8s\.io/bundle-version}{"\n"}'

Our k3s node printed v1.6.3, which is the bundle k3s ships through its own gateway-api-crd HelmChart. If Istio, Cilium, Envoy Gateway or a distribution chart owns these CRDs on your cluster, check that it accepts v1.7.0 first, because --force-conflicts takes field ownership away from it. We applied the standard install from the Gateway API release:

export GATEWAY_API_VERSION="v1.7.0" # pin: version Traefik 3.8 targets #https://github.com/kubernetes-sigs/gateway-api/releases
kubectl apply --server-side --force-conflicts -f https://github.com/kubernetes-sigs/gateway-api/releases/download/${GATEWAY_API_VERSION}/standard-install.yaml

That is the standard channel. If the cluster already runs experimental Gateway CRDs, or you need listener filters, apply experimental-install.yaml from the same release instead, because the safe-upgrades policy in v1.7.0 refuses experimental CRDs on top of standard ones and refuses any bundle older than v1.7.0 from then on. Then confirm every Gateway CRD reports the new bundle and that TCPRoute serves v1 only:

kubectl get crd -o custom-columns=NAME:.metadata.name,BUNDLE:.metadata.annotations.gateway\\.networking\\.k8s\\.io/bundle-version | grep -E "NAME|gateway"
kubectl get crd tcproutes.gateway.networking.k8s.io -o jsonpath='{range .spec.versions[*]}{.name} served={.served}{"\n"}{end}'

The same two commands work as a post-upgrade check on any cluster. On ours, all ten Gateway CRDs showed v1.7.0, and TCPRoute listed v1 served=true next to v1alpha2 served=false:

Gateway API CRDs at bundle v1.7.0 with TCPRoute v1 served and v1alpha2 no longer served

If you route TCP through the Gateway provider, move every TCPRoute manifest from gateway.networking.k8s.io/v1alpha2 to v1 now. We restarted k3s afterwards to see whether its bundled chart would push v1.6.3 back, and the CRDs stayed on v1.7.0. A k3s upgrade that ships a newer gateway-api-crd chart is a different case, so check the bundle version again after each k3s upgrade.

The migration guide also changes the RBAC that the Gateway provider needs. The chart manages its ClusterRole for you, but a hand-written one needs these edits.

  • Add listenersets (get, list, watch)
  • Add listenersets/status (update)
  • Add certificates.k8s.io clustertrustbundles (list, watch)
  • Optionally remove the get verb and referencegrants/status

The removals are optional, since the guide says existing RBAC keeps working. Traefik reads ClusterTrustBundles through the certificates.k8s.io/v1 API, which went GA in Kubernetes 1.37. If you do not use the Gateway provider at all, none of this RBAC applies to you. Gateway users with hardened TLS should also move those settings off the default TLS option, which no longer applies to HTTPS listeners.

Step 5: Run the Traefik 3.8 Helm upgrade

With the CRDs in place, the upgrade itself is one command. Chart 43 supports Traefik Proxy 3.7 and newer only, and chart 42 and newer need Kubernetes 1.30 or later, so very old clusters must be upgraded first. Pin the chart version so a later helm repo update does not change what you tested:

helm upgrade traefik traefik/traefik --namespace traefik --version 43.0.0 -f values-3.8.yaml #https://github.com/traefik/traefik-helm-chart/releases

Our first attempt used the old values file and the chart schema stopped it, which is the failure from Step 2. The second run with the renamed key went through and rolled a new pod with the 3.8.0 image:

helm upgrade to Traefik chart 43.0.0 failing on the logs key, then succeeding with docker.io/traefik:v3.8.0

Wait for the rollout before testing, otherwise the old pod may still answer some requests.

kubectl -n traefik rollout status deploy/traefik --timeout=180s

Then read the startup log once. Traefik 3.8 prints several new warnings on a default install, and none of them is an error.

kubectl -n traefik logs deploy/traefik | grep WRN

We got four kinds of warning, trimmed here to the first clause of each.

WRN Traefik can reject some encoded characters in the request path. When your backend is not fully compliant with RFC 3986 ...
WRN aliasHeadersStrategy is not configured: the request headers whose name aliases another header name (e.g. X_Auth_User or X.Auth.User for X-Auth-User) are forwarded as is. ... entryPointName=web
WRN SafeNaming is not explicitly set: generated routers, middlewares and services will use the legacy naming scheme ... providerName=kubernetescrd
WRN PeerCertURI option is deprecated, please use PeerCertSANs instead

The aliasHeadersStrategy one deserves attention if Traefik fronts PHP, CGI, WSGI or NGINX backends, because those read X_Auth_User as X-Auth-User and a client can spoof headers that Traefik sets. The warning recommends delete or reject on those entry points. In chart 43 that is global.aliasHeadersStrategy: delete for every entry point, or ports.web.http.aliasHeadersStrategy for one. The last line is our deprecated ServersTransport, which Step 8 fixes.

Step 6: Check plugin Middlewares that reference ConfigMaps

Traefik 3.8 resolves any plugin configuration string of the form urn:k8s:configmap:<name>:<key> to the value of that key. Before 3.8 the plugin received the string as is. Our test Middleware set a plugindemo header from a ConfigMap in the same namespace:

apiVersion: v1
kind: ConfigMap
metadata:
  name: demo-headers
  namespace: demo
data:
  greeting: hello-from-configmap
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: demo-header
  namespace: demo
spec:
  plugin:
    demo:
      headers:
        X-Demo: "urn:k8s:configmap:demo-headers:greeting"

After the upgrade the same request returns X-Demo: hello-from-configmap. The same run shows the BasicAuth change from Step 7, with the 1100-byte password now rejected:

Traefik v3.8.0 tests: ConfigMap reference resolved to hello-from-configmap and the 1100-byte password now returns 401

Where it gets risky is a reference that does not resolve. We patched the key to a typo, greting, and the whole route went down. Traefik leaves the Middleware out of the configuration, the router that uses it cannot be built, and the host returns 404 instead of serving traffic without the header:

Traefik 3.8 drops the plugin middleware when the ConfigMap key is missing, the router returns 404 and logs key not found in configMap

A malformed reference behaves the same way. With the key part missing (urn:k8s:configmap:demo-headers) the log says malformed URN "urn:k8s:configmap:demo-headers" and the route returns 404 again. Before you upgrade, list every plugin Middleware that already contains such a string, because a plugin that used to treat it as plain text will now get something else or nothing at all:

kubectl get middlewares.traefik.io -A -o json | grep -n "urn:k8s:configmap:"

For each hit, confirm the ConfigMap and key exist in the Middleware’s namespace. The chart’s ClusterRole already grants configmaps list and watch, so a Helm install needs no RBAC change for this.

Step 7: Find BasicAuth passwords longer than 1024 bytes

Traefik 3.8 rejects BasicAuth passwords longer than 1024 bytes with a 401, and the limit is not configurable. The change also landed in the 3.7 line at 3.7.18, so a cluster on a recent 3.7 already behaves this way. Our 1100-byte password returned 200 on 3.1 and 401 on 3.8, and Traefik logged nothing about it, which is what makes this one hard to debug from the server side.

The limit applies to the password the client sends, not to the hash in your Secret, so you cannot find offenders by reading htpasswd files. Look instead at who logs in with generated material: CI jobs that pass a JWT or an API token as the password, and password managers set to very long secrets. Shorten those to well under 1024 bytes, or move token clients to ForwardAuth. If users report a sudden “traefik basicauth 401 after upgrade”, ask for the password length before looking at the Secret.

Step 8: Replace peerCertURI with peerCertSANs

The peerCertURI field of ServersTransport and ServersTransportTCP is deprecated in favour of peerCertSANs, which accepts several SANs of type URI or DNSName. The old field still works in 3.8. What you get is the startup warning we captured in Step 5, PeerCertURI option is deprecated, please use PeerCertSANs instead. Our old object pinned a SPIFFE URI:

apiVersion: traefik.io/v1alpha1
kind: ServersTransport
metadata:
  name: mtls-backend
  namespace: demo
spec:
  serverName: whoami.demo.svc
  peerCertURI: spiffe://homelab/whoami

Our replacement moves the same value into a list entry with an explicit type. This needs the CRDs from Step 3, since the old schema has no peerCertSANs field:

apiVersion: traefik.io/v1alpha1
kind: ServersTransport
metadata:
  name: mtls-backend
  namespace: demo
spec:
  serverName: whoami.demo.svc
  peerCertSANs:
    - type: URI
      value: spiffe://homelab/whoami

We swapped the object in place with kubectl replace -f, so no field from the old spec could linger. After a restart of the Traefik deployment, a count of PeerCertURI lines in the log came back as 0. Find the remaining objects with this query:

kubectl get serverstransports.traefik.io,serverstransporttcps.traefik.io -A -o json | grep -n peerCertURI

Do not roll this change out before the Traefik pods run 3.8. An older Traefik ignores peerCertSANs, so the backend would be accepted without the SAN check you meant to keep.

Step 9: Try Yaegi v2 for plugins (opt-in)

Yaegi v2 is the new interpreter for Go plugins, and it is off by default. Traefik 3.8 keeps running every plugin on Yaegi v1 unless you ask for v2. According to Traefik Labs, v2 only loads plugins that the Go compiler accepts, and it limits a plugin’s CPU time, memory and goroutines. A plugin can also request v2 itself with runtimeVersion: v2 in its manifest. The chart has no value for it yet, so we passed the static option through additionalArguments:

additionalArguments:
  - "--experimental.defaultruntimeversion=v2"

Add that block to values-3.8.yaml and run the same helm upgrade command again. The plugin still loaded, and the test script gave the same results as on v1. To prove which interpreter was in use, we started throwaway Traefik pods at debug level with v1, v2 and a wrong value:

Traefik 3.8 debug logs for defaultruntimeversion v1 and v2 with plugindemo, v2 showing Loading plugin with Yaegi v2

Only the v2 pod logs Loading plugin with Yaegi v2, and a pod without the flag reports "defaultRuntimeVersion":"v1" in its static configuration dump, which confirms v1 is still the default. A typo is not harmless. The pod started with v3 logged this instead:

DBG Installing plugin: demo: github.com/traefik/[email protected]
ERR Plugins are disabled because an error has occurred.
error="resolving Yaegi version: unknown Yaegi version: \"v3\"" plugins=["demo"]

Traefik keeps running but loads no plugin at all, so any Middleware built on one stops working. Traefik Labs’ Yaegi v2 announcement measures header and regex plugins at about twice the speed of v1, but its JSON plugin got slower, and the first plugin load in a process takes about 110 ms against 15 ms on v1. We did not benchmark that ourselves. Test v2 in staging with each plugin you run before you set it cluster-wide.

What broke in our lab

Two failures cost us time, and neither one is in the Traefik migration guide. The first came before the upgrade. Installing the old chart 30.0.2 on a fresh k3s 1.37 cluster failed outright, because that chart bundles Gateway API CRDs from v1.0.0. k3s ships the v1.6.3 bundle together with a ValidatingAdmissionPolicy called safe-upgrades.gateway.networking.k8s.io, which refuses Gateway CRDs older than v1.5.0:

helm install of Traefik chart 30.0.2 on k3s refused by the safe-upgrades Gateway API ValidatingAdmissionPolicy

The way out was helm install --skip-crds, after applying only the traefik.io and hub.traefik.io CRDs from the old chart. Do not delete the policy as the message suggests; it is what stops an old chart from downgrading the Gateway CRDs that other controllers on the cluster rely on. If you follow an older install guide on a current k3s, such as our k3s setup on Ubuntu 26.04, this is the error you will meet.

The second failure was the chart values schema from Step 2, additional properties 'logs' not allowed. It is harmless because Helm stops before it changes anything, but it means you cannot jump from an old chart with an untouched values file. The 404 from a typo in a ConfigMap key was the third surprise. We expected a missing header, not a dead route.

Roll back a Traefik 3.8 upgrade with Helm

If production traffic misbehaves after the upgrade, helm rollback to the revision you noted in Step 1 brings the old pods back. The CRDs stay at the new version, and the old Traefik ignores the fields it does not know. We rolled back to revision 1 and then forward again:

helm rollback traefik 1 -n traefik --wait --timeout 3m

Helm records the rollback as a new revision, so the history keeps every step you took.

helm rollback of the Traefik release from chart 43.0.0 back to revision 1 on chart 30.0.2

After the rollback, our test script returned the literal ConfigMap string and a 200 for the 1100-byte password again, so the old behaviour came back completely. What does Helm not undo for you? Two things stay behind after a rollback.

  • ServersTransports moved to peerCertSANs lose their SAN check
  • TCPRoutes written as v1 still need the v1.7.0 CRDs

That is why we roll back the Traefik pods and leave the CRDs alone. Downgrading the CRDs would orphan the objects already stored at the new versions, and on k3s the admission policy from the previous section would refuse it anyway.

To bring the release forward again, roll back to the revision that ran chart 43 (revision 2 in our history) or rerun the helm upgrade from Step 5. If you expose the dashboard, the Traefik dashboard on k3s guide is a quick way to see the Middleware errors from Step 6 without reading logs. For more IngressRoute examples to test against, see our AWX behind a Traefik IngressRoute walkthrough, the Traefik setup on k0s and the Helm 3 basics if helm history and helm rollback are new to you. The full release notes are on the Traefik v3.8.0 release page.

Keep reading

Best UI Applications for Managing Docker Containers Containers Best UI Applications for Managing Docker Containers Install Docker and Run Containers on Ubuntu 24.04|22.04 Containers Install Docker and Run Containers on Ubuntu 24.04|22.04 Install UniFi OS Server on Ubuntu 26.04 / 24.04 LTS Containers Install UniFi OS Server on Ubuntu 26.04 / 24.04 LTS magpie: One AI Gateway for Claude Code and Codex on Linux AI magpie: One AI Gateway for Claude Code and Codex on Linux Upgrade Argo CD: What Helm 4 Breaks in Your Helm Apps Containers Upgrade Argo CD: What Helm 4 Breaks in Your Helm Apps The Top 3 Secure Software Management Systems Available Containers The Top 3 Secure Software Management Systems Available

Leave a Comment

Press ESC to close