Skip to content

Why Is Traefik Installed During a New K3S Install With Helm?

When initiating a new installation with k3s (which incorporates helm), you may notice that Traefik appears alongside other components. This can be puzzling at first glance, but the reason for this is rooted in how k3s integrates Traefik into its setup process:

The Default Configuration of K3S Installation Process

K3S’ installation includes a predefined configuration that automatically installs Traefik as part of setting up your cluster. Here’s why it appears when you list out all managed resources with helm ls -A:

$ helm ls -A
NAME        NAMESPACE   REVISION    UPDATED                                 STATUS      CHART              APP VERSION
traefik     kube-system 2           2023-08 extraneous deployed: traefik-crd (unnecessary)          v2.9.10

The helm ls -A output shows Traefik and its corresponding custom Resource Definitions (traefik-crd), with revisions indicating when they were installed, as well as the current status of each component in your cluster’s namespace—the default is usually ‘deployed’. Here’s a more detailed look:

Traefik Installation and Dependency Explanation

Traefik does not come from Helm itself; instead, it comes bundled with k3s. The official documentation for k3s can be found here. This manifest file is used by default to install Traefik as part of the standard Kubernetes setup:

# Default traefik installation via k3s' configuration (simplified)
kubectl apply -f https://raw.githubusercontent.com/rancher/container-service/master/manifests/traefik.yaml

This manifest defines Traefik as a service, and it comes with associated CRD resources for managing the components of your K3S cluster more effectively. Hence its presence on helm ls -A. The version noted indicates that you have an outdated release (21st revision). It’s recommended to update this by applying newer manifest files from their official repository:

# Updating traefik installation with the latest configuration/release file for K3S+Traefik integration. This can usually be done using kubectl apply command, as described below:
kubectl apply -f https://raw.githubusercontent.com/rancher/container-service/main/manifests/traefik_latest.yaml  # Note that the URL should point to your repository's latest manifest file for Traefik and associated CRD resources if different from above

By doing so, you ensure compatibility with up-to-date security patches as well as any new features or fixes provided by updates in K3S.

To summarize: when using k3s (the container orchestrator) which includes helm management tools for Helm charts deployment on your cluster and lists Traefik, it is because traefik comes preinstalled with kube-system namespace as part of the core setup to provide secure access control. To manage or update this component separately via helm, you would need additional configurations beyond what’s provided by default in a standard K3S installation.


Previous Post
Azure DevOps Release Pipeline Handles Offline Depl
Next Post
How GitLab Handles Stranded Orphaned Artifacts i