traefik / mesh

Traefik Mesh - Simpler Service Mesh
https://traefik.io/traefik-mesh
Apache License 2.0
2.02k stars 141 forks source link

Can't clean my cluster from Traefik Mesh's installation #781

Closed delucca closed 3 years ago

delucca commented 3 years ago

Bug Report

What did you do?

I'm testing Traefik Mesh in a fresh cluster at AWS (using EKS). I've followed all the installation steps and created a sample application that uses a Postgres database.

That Postgres database is also hosted in my cluster, and it uses OpenEBS to persist data.

OpenEBS, in a nutshell, creates a PVC and Postgres mounts that PVC using a storage class.

What did you expect to see?

With Traefik Mesh installed, I would expect the Postgres pod to be ready and working.

What did you see instead?

The Postgres pod was stuck in the ContainerCreating state. After further inspection with the help of OpenEBS collaborators, I've found out that the issue was related to #746, which was already solved by #772.

Since I'm waiting for a new release for it, I would like to clear my cluster from Traefik Mesh installation until that. I've searched the docs but was not able to find anything explaining to me how to do so.

I've already removed all Traefik Mesh resources. I've also seen some modifications that Traefik Mesh does to CoreDNS, but removing than also didn't do the trick. My Postgres pod is still stuck at the same state, trying to mount a PVC that it cannot find.

IMPORTANT: In a fresh new cluster, with the same resources (I use Gitops, so it is easy for me to replicate) but without installing Traefik Mesh at any moment, the Postgres pod is created as expected.

Anyone can give me a hint how to remove all Traefik Mesh modifications to my cluster's network?

kevinpollet commented 3 years ago

Hello @delucca and thanks for your interest in Traefik Mesh,

First, sorry for the delayed response...

Uninstalling Traefik Mesh with Helm remove all the Traefik Mesh resources and configuration from the Kubernetes cluster. This means that the shadow services created as well as the controller, Traefik proxies and the CoreDNS configuration should be removed. More details can be found in the following documentation.

As Traefik Mesh does not modify the user resources, Traefik Mesh will never interfere with the Postgres pod deployment. Moreover, the installation in a fresh cluster does not validate that Traefik Mesh is the root cause of your issue.

delucca commented 3 years ago

Hello @delucca and thanks for your interest in Traefik Mesh,

First, sorry for the delayed response...

Uninstalling Traefik Mesh with Helm remove all the Traefik Mesh resources and configuration from the Kubernetes cluster. This means that the shadow services created as well as the controller, Traefik proxies and the CoreDNS configuration should be removed. More details can be found in the following documentation.

As Traefik Mesh does not modify the user resources, Traefik Mesh will never interfere with the Postgres pod deployment. Moreover, the installation in a fresh cluster does not validate that Traefik Mesh is the root cause of your issue.

Thanks for your reply.

I don't install resources using Helm, since I have a Gitops infrastructure. So I install Traefik Mesh manifests directly on my cluster. Can you please explain how can I proceed with the removal (if necessary)?

kevinpollet commented 3 years ago

Hello @delucca,

I don't know if this is what you are looking for, but Traefik Mesh has a cleanup command which will remove the CoreDNS configuration and the shadow services created. Basically, on Helm uninstall the following resource is created which will call the cleanup command https://github.com/traefik/mesh-helm-chart/blob/master/mesh/templates/controller/hooks/cleanup-hook.yaml#L85.

Here is the help of the cleanup command:

cleanup    Removes Traefik Mesh shadow services from a Kubernetes cluster.

Usage: cleanup [command] [flags] [arguments]

Use "cleanup [command] --help" for help on any command.

Flag's usage: cleanup [--flag=flag_argument] [-f [flag_argument]]    # set flag_argument to flag(s)
          or: cleanup [--flag[=true|false| ]] [-f [true|false| ]]    # set true/false to boolean flag(s)

Flags:
    --configfile  (Default: "")
        Configuration file to use. If specified all other flags are ignored.

    --kubeconfig  (Default: "")
        Path to a kubeconfig. Only required if out-of-cluster.

    --logformat  (Default: "common")
        The log format.

    --loglevel  (Default: "error")
        The log level.

    --masterurl  (Default: "")
        The address of the Kubernetes API server. Overrides any value in kubeconfig.
        Only required if out-of-cluster.

    --namespace  (Default: "maesh")
        The namespace that Traefik Mesh is installed in.