T4K Cleanup Plugin
tvk-cleanup is a kubectl plugin that uninstalls the Trilio Operator, Application, Custom Resources, and CRDs in a Kubernetes cluster.
Prerequisites:
sudo ln -s /usr/local/bin/oc /usr/local/bin/kubectltvk-cleanup is a kubectl plugin that uninstalls the Trilio Operator, Application, Custom Resources, and CRDs in a Kubernetes cluster.
sudo ln -s /usr/local/bin/oc /usr/local/bin/kubectlkubectl krew index add tvk-plugins https://github.com/trilioData/tvk-plugins.gitkubectl krew install tvk-plugins/tvk-cleanupkubectl krew upgrade tvk-cleanupkubectl krew uninstall tvk-cleanup(
set -ex; cd "$(mktemp -d)" &&
if [[ -z ${version} ]]; then version=$(curl -s https://api.github.com/repos/trilioData/tvk-plugins/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")'); fi &&
echo "Installing version=${version}" &&
curl -fsSLO "https://github.com/trilioData/tvk-plugins/releases/download/"${version}"/cleanup.tar.gz" &&
tar zxvf cleanup.tar.gz && sudo mv cleanup/cleanup /usr/local/bin/kubectl-tvk_cleanup
)kubectl tvk-cleanup [options] [arguments]
Options:
-h, --help show brief help
-n, --noninteractive run script in non-interactive mode
-c, --crd delete Trilio CRDs
-t, --tvm delete Trilio Manager or Operator
-r, --resources \"resource1 resource2..\"
specify list of Trilio CRs to delete
If not provided, all Trilio CRs (listed below) will be deleted
e.g. Restore Backup Backupplan ClusterRestore ClusterBackup
ClusterBackupPlan Hook Target Policy Licensekubectl tvk-cleanup -t -c -rkubectl tvk-cleanup -n -t -c -rkubectl tvk-cleanup -n -tkubectl tvk-cleanup -n -ckubectl tvk-cleanup -n -r "Restore Backup Backupplan"