k3s-traefik-config

by philippwaller

Helm chartv1.0.5App v1.0.1

This Helm Chart allows to persistently overwrite the default Traefik configuration of a K3s cluster.

About this chart

K3s Traefik Configuration

This Helm Chart allows to override the default Traefik configuration of a K3s cluster.

TL;DR

helm repo add philippwaller https://charts.philippwaller.com
helm install custom philippwaller/k3s-traefik-config -n kube-system

Introduction

This charts deploys a HelmChartConfig to overwrite the default Traefik configuration of a K3s cluster. An additional deployed Kubernetes job copies the manifest file to the bootstrap folder of the "ControlPlane" node. This ensures that the configuration is applied at every restart.

Prerequisites

  • Kubernetes 1.23+
  • Helm 3.1+

Parameters

Common parameters

NameDescriptionValue
nameOverrideString to partially override common.names.fullname""
fullnameOverrideString to fully override common.names.fullname""

Traefik Configuration

NameDescriptionValue
traefikConfigTraefik configuration{}

Docker Image

NameDescriptionValue
image.repositoryjob image repositoryalpine
image.pullPolicyimage pull policyIfNotPresent
image.tagOverrides the image tag whose default is the chart appVersion.3.15.0
imagePullSecretsIf defined, uses a Secret to pull an image from a private Docker registry or repository[]

Job Configuration

NameDescriptionValue
podAnnotationsAnnotations to be added to the job pod{}
podSecurityContextjob pod-level security context{}
securityContextSecurity context{}
resourcesResource limits and requests{}
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityAffinity for pod assignment{}

Service Account

NameDescriptionValue
serviceAccount.createSpecifies whether a service account should be createdtrue
serviceAccount.annotationsAnnotations to add to the service account{}
serviceAccount.nameThe name of the service account to use.""

Support this project

If this project was useful to you in some form, I would be glad to have your support by starring ⭐️ this repository.

Deploy k3s-traefik-config with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has k3s-traefik-config on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartk3s-traefik-config is pinned at v1.0.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply