meshctl cluster deregister

meshctl cluster deregister

Deregister a Kubernetes cluster from Gloo Mesh and clean up the associated Gloo Mesh resources from the cluster.


Deregistering a cluster removes the installed agent from the remote cluster as well as the other created resources such as secrets.

The name of the context of the cluster to deregister must be provided via the –remote-context flag. It is important that the remote context and the name passed as an argument are for the same cluster otherwise unexpected behavior may occur.

If the management cluster is different than the one that the current context points to then it can be provided via the –kubecontext flag.

meshctl cluster deregister [cluster name] [flags]


 meshctl cluster deregister --remote-context=<remote-cluster-1-context> cluster-1


  -h, --help                       help for deregister
      --remote-context string      Name of the kubernetes context to use for the remote cluster
      --remote-kubeconfig string   Path to the kubeconfig file for the remote cluster
      --remote-namespace string    Namespace in the target cluster where the Gloo Mesh agent is installed. (default "gloo-mesh")

Options inherited from parent commands

      --kubeconfig string    Path to the kubeconfig file for the cluster
      --kubecontext string   Name of the Kubernetes context for the management cluster
  -n, --namespace string     Namespace where Gloo Mesh should be installed (default "gloo-mesh")
      --plain                Add this flag to disable styling for terminal output
  -v, --verbose              Enable verbose logging