Answers: <h2>Install new CRDs and RBAC for Kube v1.16+</h2>
  <p>Yes, but because of the CRDs in Helm are managed by Rancher and not Traefik, and they <a href="https://doc.traefik.io/traefik/reference/dynamic-configuration/kubernetes-crd/#definitions" rel="nofollow noreferrer">were changed upstream</a>,</p>
  <blockquote>
  <p>The <code>apiextensions.k8s.io/v1beta1</code> CustomResourceDefinition is deprecated in Kubernetes v1.16+ and will be removed in v1.22+. For Kubernetes v1.16+, please use the Traefik <code>apiextensions.k8s.io/v1</code> CRDs instead.</p>
  </blockquote>
  <p>You must install the <a href="https://doc.traefik.io/traefik/providers/kubernetes-crd/" rel="nofollow noreferrer">new CRDs and RBAC's</a>.</p>
  <pre><code># Install Traefik Resource Definitions:
  kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
  
  # Install RBAC for Traefik:
  kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml
  </code></pre>
  <h2>Upgrade Traefik</h2>
  <p>Then you can install the Traefik repos and upgrade Traefik,</p>
  <pre><code>helm repo add traefik https://traefik.github.io/charts
  helm repo update
  helm upgrade traefik traefik/traefik -n kube-system
  </code></pre>
  <p>Now you should see that the upgrade was complete,</p>
  <pre><code>❯ helm history traefik -n kube-system
  REVISION    UPDATED                     STATUS      CHART                   APP VERSION DESCRIPTION     
  1           Sun Aug 13 18:45:21 2023    superseded  traefik-21.2.1+up21.2.0 v2.9.10     Install complete
  2           Sun Aug 13 13:48:07 2023    deployed    traefik-24.0.0          v2.10.4     Upgrade complete
  </code></pre>
  <hr />
  <h2>Remove deprecated CRDs</h2>
  <p>Now you can optionally remove the <code>traefik-crd</code> that Rancher provides, but because the crd's are versioned, you can just keep it too.</p>
  <pre><code>helm delete -n kube-system traefik-crd
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2023-08-13T19:09:40.560Z
Answers: 2023-08-13T19:09:40.560Z
Answers: Evan Carroll
Answers: <h3>remove old</h3>
  <p>We can <code>uninstall</code> traefik using helm</p>
  <pre class="lang-bash prettyprint-override"><code>helm uninstall traefik -n kube-system
  </code></pre>
  <h3>add new</h3>
  <p>then install the latest version</p>
  <pre class="lang-bash prettyprint-override"><code>helm repo add traefik https://traefik.github.io/charts
  
  helm repo update
  
  helm install traefik traefik/traefik -n kube-system
  </code></pre>
  <p>If updating needed, we can do it with helm values</p>
  <pre class="lang-bash prettyprint-override"><code>### save the values
  helm show values traefik/traefik &gt; value.yaml
  
  ### update and save
  vim value.yaml
  
  ### apply 
  helm upgrade traefik  traefik/traefik -f value.yaml -n kube-system
  
  </code></pre>
  <h3>check</h3>
  <pre class="lang-bash prettyprint-override"><code>helm list -n kube-system
  NAME        NAMESPACE   REVISION    UPDATED                                     STATUS      CHART                       APP VERSION
  traefik     kube-system 3           2024-08-08 09:17:45.673772087 +0330 +0330   deployed    traefik-30.0.2              v3.1.0     
  traefik-crd kube-system 1           2024-08-07 16:32:37.804433746 +0000 UTC     deployed    traefik-crd-25.0.3+up25.0.0 v2.10.5 
  </code></pre>
  <p>and</p>
  <pre class="lang-bash prettyprint-override"><code>helm history  traefik -n kube-system 
  REVISION    UPDATED                     STATUS      CHART           APP VERSION DESCRIPTION     
  1           Wed Aug  7 23:04:25 2024    superseded  traefik-30.0.2  v3.1.0      Install complete
  2           Thu Aug  8 09:15:08 2024    superseded  traefik-30.0.2  v3.1.0      Upgrade complete
  3           Thu Aug  8 09:17:45 2024    deployed    traefik-30.0.2  v3.1.0      Upgrade complete
  </code></pre>
  <p>an issue you man face <a href="https://github.com/k3s-io/k3s/discussions/10683" rel="nofollow noreferrer">helm upgrade traefik dual-stack ipv6 is removed for traefik service #10683</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2024-08-08T08:11:05.170Z
Answers: 2024-08-08T08:22:18.230Z
Answers: 2024-08-08T08:22:18.230Z
Answers: Shakiba Moshiri
Body: <p>If <a href="https://devops.stackexchange.com/q/18192/18965">k3s installs traefik and flags it as a helm chart</a>, can it be updated through helm? When I run the commands below,</p>
  <pre><code>helm repo add traefik https://traefik.github.io/charts
  helm repo update
  helm upgrade traefik traefik/traefik -n kube-system
  </code></pre>
  <p>I get the following</p>
  <blockquote>
  <p>Error: UPGRADE FAILED: resource mapping not found for name: &quot;traefik-dashboard&quot; namespace: &quot;kube-system&quot; from &quot;&quot;: no matches for kind &quot;IngressRoute&quot; in version &quot;traefik.io/v1alpha1&quot;
  ensure CRDs are installed first</p>
  </blockquote>
  
Comments: CC BY-SA 4.0
Comments: 2023-08-14T08:28:49.000Z
Comments: Note that K3s uses Helm Controller for deploying the built in Helm charts. 
  You can tweak existing installed charts using the `HelmChartConfig` CRD.
  https://docs.k3s.io/helm#customizing-packaged-components-with-helmchartconfig
Comments: AAD
Tags: <k3s><traefik>
Title: Can the K3s installed Traefik be updated independently through helm?
UserDisplayName: Evan Carroll
ThreadText: # Can the K3s installed Traefik be updated independently through helm?
  
  (Asked by: username_0 on 2023-08-13)
  
  If [k3s installs traefik and flags it as a helm chart](https://devops.stackexchange.com/q/18192/18965), can it be updated through helm? When I run the commands below,
  
  ```
  helm repo add traefik https://traefik.github.io/charts
  helm repo update
  helm upgrade traefik traefik/traefik -n kube-system
  
  ```
  
  I get the following
  
  > Error: UPGRADE FAILED: resource mapping not found for name: "traefik-dashboard" namespace: "kube-system" from "": no matches for kind "IngressRoute" in version "traefik.io/v1alpha1"
  > ensure CRDs are installed first
  
  **Tags:** k3s, traefik
  
  > **Comments:**
  > **username_1**: Note that K3s uses Helm Controller for deploying the built in Helm charts.  You can tweak existing installed charts using the `HelmChartConfig` CRD. https://docs.k3s.io/helm#customizing-packaged-components-with-helmchartconfig  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2023-08-13. Score: 1 | Accepted answer
  
  ## Install new CRDs and RBAC for Kube v1.16+
  
  Yes, but because of the CRDs in Helm are managed by Rancher and not Traefik, and they [were changed upstream](https://doc.traefik.io/traefik/reference/dynamic-configuration/kubernetes-crd/#definitions),
  
  > The `apiextensions.k8s.io/v1beta1` CustomResourceDefinition is deprecated in Kubernetes v1.16+ and will be removed in v1.22+. For Kubernetes v1.16+, please use the Traefik `apiextensions.k8s.io/v1` CRDs instead.
  
  You must install the [new CRDs and RBAC's](https://doc.traefik.io/traefik/providers/kubernetes-crd/).
  
  ```
  # Install Traefik Resource Definitions:
  kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
  
  # Install RBAC for Traefik:
  kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml
  
  ```
  
  ## Upgrade Traefik
  
  Then you can install the Traefik repos and upgrade Traefik,
  
  ```
  helm repo add traefik https://traefik.github.io/charts
  helm repo update
  helm upgrade traefik traefik/traefik -n kube-system
  
  ```
  
  Now you should see that the upgrade was complete,
  
  ```
  ❯ helm history traefik -n kube-system
  REVISION    UPDATED                     STATUS      CHART                   APP VERSION DESCRIPTION     
  1           Sun Aug 13 18:45:21 2023    superseded  traefik-21.2.1+up21.2.0 v2.9.10     Install complete
  2           Sun Aug 13 13:48:07 2023    deployed    traefik-24.0.0          v2.10.4     Upgrade complete
  
  ```
  
  ---
  
  ## Remove deprecated CRDs
  
  Now you can optionally remove the `traefik-crd` that Rancher provides, but because the crd's are versioned, you can just keep it too.
  
  ```
  helm delete -n kube-system traefik-crd
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2024-08-08. Score: 0
  
  ### remove old
  
  We can `uninstall` traefik using helm
  
  ```bash
  helm uninstall traefik -n kube-system
  
  ```
  
  ### add new
  
  then install the latest version
  
  ```bash
  helm repo add traefik https://traefik.github.io/charts
  
  helm repo update
  
  helm install traefik traefik/traefik -n kube-system
  
  ```
  
  If updating needed, we can do it with helm values
  
  ```bash
  ### save the values
  helm show values traefik/traefik > value.yaml
  
  ### update and save
  vim value.yaml
  
  ### apply 
  helm upgrade traefik  traefik/traefik -f value.yaml -n kube-system
  
  ```
  
  ### check
  
  ```bash
  helm list -n kube-system
  NAME        NAMESPACE   REVISION    UPDATED                                     STATUS      CHART                       APP VERSION
  traefik     kube-system 3           2024-08-08 09:17:45.673772087 +0330 +0330   deployed    traefik-30.0.2              v3.1.0     
  traefik-crd kube-system 1           2024-08-07 16:32:37.804433746 +0000 UTC     deployed    traefik-crd-25.0.3+up25.0.0 v2.10.5 
  
  ```
  
  and
  
  ```bash
  helm history  traefik -n kube-system 
  REVISION    UPDATED                     STATUS      CHART           APP VERSION DESCRIPTION     
  1           Wed Aug  7 23:04:25 2024    superseded  traefik-30.0.2  v3.1.0      Install complete
  2           Thu Aug  8 09:15:08 2024    superseded  traefik-30.0.2  v3.1.0      Upgrade complete
  3           Thu Aug  8 09:17:45 2024    deployed    traefik-30.0.2  v3.1.0      Upgrade complete
  
  ```
  
  an issue you man face [helm upgrade traefik dual-stack ipv6 is removed for traefik service #10683](https://github.com/k3s-io/k3s/discussions/10683)
  
  
  ---
  
  