<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Xicre]]></title><description><![CDATA[Minds are like parachutes. They only function when open. - Thomas Dewar]]></description><link>https://blog.xicre.com</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1630780845871/_RceW6nvA.png</url><title>Xicre</title><link>https://blog.xicre.com</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 15:17:40 GMT</lastBuildDate><atom:link href="https://blog.xicre.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Customize Traefik chart on K3s]]></title><description><![CDATA[K3s is a lightweight Kubernetes distribution that packs default components as HELM charts, Traefik for example.
According to the  documentation, to allow overriding values for packaged components that are deployed as HelmCharts (such as Traefik), K3s...]]></description><link>https://blog.xicre.com/customize-traefik-chart-on-k3s</link><guid isPermaLink="true">https://blog.xicre.com/customize-traefik-chart-on-k3s</guid><category><![CDATA[Kubernetes]]></category><dc:creator><![CDATA[Alex Fernandez]]></dc:creator><pubDate>Sat, 04 Sep 2021 19:04:08 GMT</pubDate><content:encoded><![CDATA[<p>K3s is a lightweight Kubernetes distribution that packs default components as HELM charts, Traefik for example.</p>
<p>According to the  <a target="_blank" href="https://rancher.com/docs/k3s/latest/en/helm/#customizing-packaged-components-with-helmchartconfig">documentation</a>, to allow overriding values for packaged components that are deployed as HelmCharts (such as Traefik), K3s versions starting with <strong>v1.19.0+k3s1 </strong>support customizing deployments via a HelmChartConfig resources. The HelmChartConfig resource must match the name and namespace of its corresponding HelmChart, and supports providing additional valuesContent, which is passed to the helm command as an additional value file.</p>
<h2 id="example-enable-traefik-prometheus-metrics-on-k3s">Example: Enable Traefik Prometheus metrics on K3s</h2>
<p>Create the file <code>/var/lib/rancher/k3s/server/manifests/traefik-config.yaml</code> on K3s host. To make it easier you can take the <code>traefik.yaml</code> file contents as a example and customize it as necessary.</p>
<pre><code class="lang-yaml"><span class="hljs-attr">apiVersion:</span> <span class="hljs-string">helm.cattle.io/v1</span>
<span class="hljs-attr">kind:</span> <span class="hljs-string">HelmChartConfig</span>
<span class="hljs-attr">metadata:</span>
  <span class="hljs-attr">name:</span> <span class="hljs-string">traefik</span>
  <span class="hljs-attr">namespace:</span> <span class="hljs-string">kube-system</span>
<span class="hljs-attr">spec:</span>
  <span class="hljs-attr">valuesContent:</span> <span class="hljs-string">|-
    rbac:
      enabled: true
    ports:
      websecure:
        tls:
          enabled: true
    additionalArguments:
    - "--metrics.prometheus=true"
    podAnnotations:
      prometheus.io/port: "8082"
      prometheus.io/scrape: "true"
    providers:
      kubernetesIngress:
        publishedService:
          enabled: true
    priorityClassName: "system-cluster-critical"
    image:
      name: "rancher/library-traefik"
    tolerations:
    - key: "CriticalAddonsOnly"
      operator: "Exists"
    - key: "node-role.kubernetes.io/control-plane"
      operator: "Exists"
      effect: "NoSchedule"
    - key: "node-role.kubernetes.io/master"
      operator: "Exists"
      effect: "NoSchedule"</span>
</code></pre>
<p>In this case we added the additional argument "--metrics.prometheus=true" which will enable the /metrics endpoint on Traefik with prometheus format.  You can provide any other values from the  <a target="_blank" href="https://github.com/traefik/traefik-helm-chart/blob/master/traefik/values.yaml">Traefik Helm chart </a> .</p>
<p>Once K3s applies it, you can confirm if the changes took place in the Dashboard.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630782004919/uo8WVzVBY.png" alt="Features" /></p>
]]></content:encoded></item></channel></rss>