Skip to content
Install the CLI

Reference experimental

traefik

These docs describe Kix's main branch, which can include changes not yet released. Read the docs for the latest release.

Traefik proxy as a Gateway API implementation (GatewayClass, Gateway, and data plane)

This page is generated from kix/packages/experimental/traefik.

StabilityExperimental
package valuepackages.experimental.traefik
Default software version3.7.19
Default aliasesgateway

Kix matches each dependency below to another package instance by instance name, alias, or role. To bind a specific instance, set deps.<name> in your cluster definition. See Declaring dependencies for how required and optional dependencies work.

DependencyRequirement
gatewayApiOptional
prometheusOptional

Extra environment variables for Traefik. A value is a string, a fieldRef source, or a secretKeyRef source naming a Secret managed outside Kix with kix.untrackedRef. TRAEFIK_* variables are refused: Traefik reads its configuration from them only when it has no flags, and the package always passes flags. Use extraArgs.

  • Type: attribute set of (null or string or env var source with `valueFrom`)
  • Default: { }

Flags appended to Traefik’s arguments. Flags the package sets or derives from are refused: each listener entrypoint’s address and --entryPoints.traefik.address, --ping, --metrics.prometheus, --providers.kubernetesGateway and its label selector, status Service, and experimental channel, --configFile, and every flag of the other Kubernetes providers. Traefik reads flag names in any case.

  • Type: list of string

  • Default: [ ]

  • Example:

    [
    "--log.level=INFO"
    ]

Image of Traefik.

  • Type: submodule

  • Default:

    {
    digest = "sha256:a6c0194dda77bcb804824580f36fa7edc56e315b1acfe933366c8b52844a78a4";
    pullPolicy = "IfNotPresent";
    repository = "docker.io/library/traefik";
    tag = "v3.7.19";
    }

Resolved manifest digest, sha256: followed by 64 hex characters. What will actually run. Null means not resolved.

  • Type: null or string
  • Default: the package’s digest while tag is the package’s tag, otherwise null

Whatever a person wanted to say about this pin. Kix never reads it and a promotion never discards it. Declared here for the same reason as the three fields above: a pin carries its own record-keeping, and the option accepts the whole pin rather than a subset of it.

  • Type: null or string
  • Default: null

Who resolved this pin, for the record. Null when unknown.

  • Type: null or string
  • Default: null

imagePullPolicy for containers using this image. Null leaves it to Kubernetes.

  • Type: null or string
  • Default: "IfNotPresent"

Image repository, registry host included.

  • Type: string
  • Default: "docker.io/library/traefik"

When this pin was resolved, RFC 3339. Null when unknown.

  • Type: null or string
  • Default: null

Revision of the source the image was built from, when Kix built it. Null for upstream images.

  • Type: null or string
  • Default: null

Image tag. What was asked for.

  • Type: string
  • Default: "v3.7.19"

Gateway API v1 Listener entries for the Gateway’s spec.listeners, with the upstream field names. Protocols HTTP, HTTPS, and TLS. An HTTPS listener with no tls.certificateRefs is a placeholder and is not rendered.

Each distinct port becomes a Traefik entrypoint and a Service port, so a listener port needs no other setting. Port 8080 is Traefik’s internal entrypoint and is refused.

kix.expose reads the rendered listeners: protocol, hostname, port and allowedRoutes.namespaces.from decide whether an HTTPRoute can attach and which URL scheme and port it gets.

  • Type: list of (submodule)

  • Default:

    [
    {
    allowedRoutes = {
    namespaces = {
    from = "All";
    };
    };
    name = "http";
    port = 80;
    protocol = "HTTP";
    }
    {
    allowedRoutes = {
    namespaces = {
    from = "All";
    };
    };
    name = "https";
    port = 443;
    protocol = "HTTPS";
    tls = {
    certificateRefs = [ ];
    mode = "Terminate";
    };
    }
    ]
  • Type: null or (submodule)
  • Default: null
  • Type: null or (list of attribute set of anything)
  • Default: null
  • Type: null or (submodule)
  • Default: null
  • Type: null or one of "All", "Same", "Selector"
  • Default: null

listeners.*.allowedRoutes.namespaces.selector

Section titled “listeners.*.allowedRoutes.namespaces.selector”
  • Type: null or (attribute set of anything)
  • Default: null
  • Type: null or string
  • Default: null
  • Type: string
  • Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
  • Type: one of "HTTP", "HTTPS", "TLS", "TCP", "UDP"
  • Type: null or (submodule)
  • Default: null
  • Type: null or (list of attribute set of anything)
  • Default: null
  • Type: null or (attribute set of anything)
  • Default: null
  • Type: null or one of "Terminate", "Passthrough"
  • Default: null
  • Type: null or (attribute set of string)
  • Default: null

Requests per second a backend must receive before TraefikBackendErrorsHigh considers its error ratio, so a few failures on a rarely used route do not fire it.

  • Type: nonnegative integer or floating point number, meaning >=0
  • Default: 0.1
  • Example: 1

Share of a backend’s requests that may end in 502, 503, or 504 before TraefikBackendErrorsHigh fires.

  • Type: integer or floating point number between 0 and 1 (both inclusive)
  • Default: 0.05
  • Example: 0.01

Enable metrics endpoint and monitoring resources (ServiceMonitor, PrometheusRules) when prometheus is available.

  • Type: boolean
  • Default: true

Scrape interval (e.g. ”30s”). Null = use Prometheus default.

  • Type: null or string
  • Default: null

How long a certificate Traefik serves must still be valid before TraefikCertificateExpiringSoon fires, as a Prometheus duration. cert-manager and Traefik’s ACME resolver renew a 90-day certificate 30 days before it expires, so 7 days left means renewal has failed for weeks. Lower it for certificates that live only a few days.

  • Type: string matching the pattern ([0-9]+(ms|s|m|h|d|w|y))+
  • Default: "7d"
  • Example: "21d"

Traefik replicas. Every replica serves traffic and writes Gateway status.

  • Type: positive integer, meaning >0
  • Default: 1, 2, 2, or 3 for the cluster’s availability level none, pod, node, or zone

Resource requests and limits for the Traefik container. There is no default limit: memory grows with the number of routes and open connections. Each field keeps its default until set, and null removes a default.

  • Type: submodule

  • Default:

    {
    requests = {
    cpu = "100m";
    memory = "64Mi";
    };
    }

Dynamic resource claims the container uses. Null leaves it unset.

  • Type: null or (list of (submodule))
  • Default: null

Name of an entry in the pod’s resourceClaims.

  • Type: string

Request within the claim to use. Null uses the whole claim.

  • Type: null or string
  • Default: null

Resource quantities by name.

  • Type: open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: { }

The cpu quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: null

The ephemeral-storage quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: null

The memory quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: null

Resource quantities by name.

  • Type: open submodule of attribute set of Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: { }

The cpu quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: "100m"

The ephemeral-storage quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: null

The memory quantity. Null leaves it unset.

  • Type: null or Kubernetes quantity, such as "500m" or "1Gi" (a non-negative decimal or integer with an optional suffix m, k, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi or Ei)
  • Default: "64Mi"

Annotations on the Traefik Service, such as a cloud provider’s load balancer settings.

  • Type: attribute set of string
  • Default: { }

Fields of the Traefik Service’s spec, with Kubernetes field names (loadBalancerClass, loadBalancerSourceRanges, ipFamilyPolicy, …). The package sets selector and ports from the listeners.

  • Type: open submodule of attribute set of anything
  • Default: { }

Local keeps client source addresses on NodePort and LoadBalancer Services. Null leaves the Kubernetes default, Cluster.

  • Type: null or one of "Cluster", "Local"
  • Default: null

Service type. LoadBalancer needs a load balancer provider in the cluster.

  • Type: one of "ClusterIP", "NodePort", "LoadBalancer"
  • Default: “NodePort” when cluster.roles.loadBalancer.binding is “absent”, “LoadBalancer” otherwise