What is the proper way to uninstall and clean up the Traefik Helm Charts?

Hi,

I install the Traefik by using Helm Charts as the following: -

helm repo add traefik https://helm.traefik.io/traefik
helm repo update
helm install traefik traefik/traefik

After that I've tried to uninstall by using the following command: -

helm uninstall traefik

Anyhow there are some resources existing after the uninstalling as the following: -

kubectl get crd | grep traefik

# Example output
ingressroutes.traefik.containo.us       2021-07-30T06:28:16Z
ingressroutetcps.traefik.containo.us    2021-07-30T06:28:16Z
ingressrouteudps.traefik.containo.us    2021-07-30T06:28:16Z
middlewares.traefik.containo.us         2021-07-30T06:28:16Z
middlewaretcps.traefik.containo.us      2021-07-30T06:28:16Z
serverstransports.traefik.containo.us   2021-07-30T06:28:16Z
tlsoptions.traefik.containo.us          2021-07-30T06:28:16Z
tlsstores.traefik.containo.us           2021-07-30T06:28:16Z
traefikservices.traefik.containo.us     2021-07-30T09:52:23Z
kubectl api-resources | grep traefik

# Example output
ingressroutes     traefik.containo.us/v1alpha1 true IngressRoute
ingressroutetcps  traefik.containo.us/v1alpha1 true IngressRouteTCP
ingressrouteudps  traefik.containo.us/v1alpha1 true IngressRouteUDP
middlewares       traefik.containo.us/v1alpha1 true Middleware
middlewaretcps    traefik.containo.us/v1alpha1 true MiddlewareTCP
serverstransports traefik.containo.us/v1alpha1 true ServersTransport
tlsoptions        traefik.containo.us/v1alpha1 true TLSOption
tlsstores         traefik.containo.us/v1alpha1 true TLSStore
traefikservices   traefik.containo.us/v1alpha1 true TraefikService

Could you please help to advise the proper way to uninstall and clean up the Traefik Helm Charts?

Regards,
Charlee Ch.

Furthermore the dashboard ingress route still exists as well.

kubectl get ingressroute

# Example output
kubectl get ingressroute
NAME                AGE
traefik-dashboard   4m41s

kubectl describe ingressroute traefik-dashboard

# Example output
Name:         traefik-dashboard
Namespace:    default
Labels:       app.kubernetes.io/instance=traefik
              app.kubernetes.io/managed-by=Helm
              app.kubernetes.io/name=traefik
              helm.sh/chart=traefik-10.1.1
Annotations:  helm.sh/hook: post-install,post-upgrade
API Version:  traefik.containo.us/v1alpha1
Kind:         IngressRoute
Metadata:
  Creation Timestamp:  2021-07-31T11:44:07Z
  Generation:          1
  Managed Fields:
    API Version:  traefik.containo.us/v1alpha1
    Fields Type:  FieldsV1
....

pull the helm chart so

helm pull traefik/traefik

unzip it

goto the crd directory

proceed to issue kubectl delete -f commands against each yaml file.

Hello @krystan

The Helm uninstall command should be good enough to uninstall Traefik released that has been deployed though Helm.

Please note that Helm does not manage upgrading and deleting CRD's, so those resources have to uninstalled manually.

If the installation created PVC it is also not removed as it is a good practice to keep a persistent data and than manually take a decision if they should be removed.