Uninstall

Uninstall - 图1caution

Removing the CRDs will remove all deployed workloads.

Fleet Standalone

Fleet is packaged as two Helm charts so uninstall is accomplished by uninstalling the appropriate Helm charts.

However Fleet uses finalizers, so uninstall workloads first to give the Fleet controllers time to clean up.

  1. kubectl delete clusters.fleet.cattle.io -A
  2. kubectl delete gitrepos -A
  3. kubectl delete bundles -A

Note, it can be easier to remove the namespaces containing the workloads, e.g.:

  1. kubectl delete ns fleet-local
  2. kubectl delete ns fleet-default

The custom resources are not uninstalled by Helm 3, remove them first:

  1. kubectl delete crd gitrepos.fleet.cattle.io bundles.fleet.cattle.io contents.fleet.cattle.io \
  2. bundledeployments.fleet.cattle.io imagescans.fleet.cattle.io \
  3. bundlenamespacemappings.fleet.cattle.io gitreporestrictions.fleet.cattle.io \
  4. clusters.fleet.cattle.io clustergroups.fleet.cattle.io \
  5. clusterregistrations.fleet.cattle.io clusterregistrationtokens.fleet.cattle.io

Then, to uninstall Fleet, run the following commands:

  1. helm -n cattle-fleet-system uninstall fleet
  2. helm -n cattle-fleet-system uninstall fleet-crd

Uninstall - 图2note

If uninstall gets stuck it is likely due to finalizers. Resource status fields, e.g. on a namespace, will list the resources waiting for their finalizers to be removed. The finalizers can be removed manually with kubectl, if their controllers are no longer running.

Afterwards one can also remove Fleet-related namespaces and their content:

  1. kubectl delete ns cattle-fleet-system
  2. kubectl delete ns cattle-fleet-clusters-system
  3. kubectl delete ns -l "fleet.cattle.io/managed=true"

Fleet in Rancher

Fleet in Rancher cannot be uninstalled, without uninstalling Rancher. However, the GitOps feature can be disabled. When disabled, the gitjob deployment is no longer deployed into the Rancher server’s local cluster, and continuous-delivery is not shown in the Rancher UI.

For more information, refer to Continuous Delivery in Rancher