LogoLogo
5.0.X
5.0.X
  • About Trilio for Kubernetes
    • Welcome to Trilio For Kubernetes
    • Version 5.0.X Release Highlights
    • Compatibility Matrix
    • Marketplace Support
    • Features
    • Use Cases
  • Getting Started
    • Getting Started with Trilio on Red Hat OpenShift (OCP)
    • Getting Started with Trilio for Upstream Kubernetes (K8S)
    • Getting Started with Trilio for AWS Elastic Kubernetes Service (EKS)
    • Getting Started with Trilio on Google Kubernetes Engine (GKE)
    • Getting Started with Trilio on VMware Tanzu Kubernetes Grid (TKG)
    • More Trilio Supported Kubernetes Distributions
      • General Installation Prerequisites
      • Rancher Deployments
      • Azure Cloud AKS
      • Digital Ocean Cloud
      • Mirantis Kubernetes Engine
      • IBM Cloud
    • Licensing
    • Using Trilio
      • Overview
      • Post-Install Configuration
      • Management Console
        • About the UI
        • Navigating the UI
          • UI Login
          • Cluster Management (Home)
          • Backup & Recovery
            • Namespaces
              • Namespaces - Actions
              • Namespaces - Bulk Actions
            • Applications
              • Applications - Actions
              • Applications - Bulk Actions
            • Virtual Machines
              • Virtual Machine -Actions
              • Virtual Machine - Bulk Actions
            • Backup Plans
              • Create Backup Plans
              • Backup Plans - Actions
            • Targets
              • Create New Target
              • Targets - Actions
            • Hooks
              • Create Hook
              • Hooks - Actions
            • Policies
              • Create Policies
              • Policies - Actions
          • Monitoring
          • Guided Tours
        • UI How-to Guides
          • Multi-Cluster Management
          • Creating Backups
            • Pause Schedule Backups and Snapshots
            • Cancel InProgress Backups
            • Cleanup Failed Backups
          • Restoring Backups & Snapshots
            • Cross-Cluster Restores
            • Namespace & application scoped
            • Cluster scoped
          • Disaster Recovery Plan
          • Continuous Restore
      • Command-Line Interface
        • YAML Examples
        • Trilio Helm Operator Values
    • Upgrade
    • Air-Gapped Installations
    • Uninstall
  • Reference Guides
    • T4K Pod/Job Capabilities
      • Resource Quotas
    • Trilio Operator API Specifications
    • Custom Resource Definition - Application
  • Advanced Configuration
    • AWS S3 Target Permissions
    • Management Console
      • KubeConfig Authenticaton
      • Authentication Methods Via Dex
      • UI Authentication
      • RBAC Authentication
      • Configuring the UI
    • Resource Request Requirements
      • Fine Tuning Resource Requests and Limits
    • Observability
      • Observability of Trilio with Prometheus and Grafana
      • Exported Prometheus Metrics
      • Observability of Trilio with Openshift Monitoring
      • T4K Integration with Observability Stack
    • Modifying Default T4K Configuration
  • T4K Concepts
    • Supported Application Types
    • Support for Helm Releases
    • Support for OpenShift Operators
    • T4K Components
    • Backup and Restore Details
      • Immutable Backups
      • Application Centric Backups
    • Retention Process
      • Retention Use Case
    • Continuous Restore
      • Architecture and Concepts
  • Performance
    • S3 as Backup Target
      • T4K S3 Fuse Plugin performance
    • Measuring Backup Performance
  • Ecosystem
    • T4K Integration with Slack using BotKube
    • Monitoring T4K Logs using ELK Stack
    • Rancher Navigation Links for Trilio Management Console
    • Optimize T4K Backups with StormForge
    • T4K GitHub Runner
    • AWS RDS snapshots using T4K hooks
    • Deploying Trilio For Kubernetes with Openshift ACM Policies
  • Krew Plugins
    • T4K QuickStart Plugin
    • Trilio for Kubernetes Preflight Checks Plugin
    • T4K Log Collector Plugin
    • T4K Cleanup Plugin
  • Support
    • Troubleshooting Guide
    • Known Issues and Workarounds
    • Contacting Support
  • Appendix
    • Ignored Resources
    • OpenSource Software Disclosure
    • CSI Drivers
      • Installing VolumeSnapshot CRDs
      • Install AWS EBS CSI Driver
    • T4K Product Quickview
    • OpenShift OperatorHub Custom CatalogSource
      • Custom CatalogSource in a restricted environment
    • Configure OVH Object Storage as a Target
    • Connect T4K UI hosted with HTTPS to another cluster hosted with HTTP or vice versa
    • Fetch DigitalOcean Kubernetes Cluster kubeconfig for T4K UI Authentication
    • Force Update T4K Operator in Rancher Marketplace
    • Backup and Restore Virtual Machines running on OpenShift
    • T4K For Volumes with Generic Storage
    • T4K Best Practices
Powered by GitBook
On this page
  • Prerequisites:
  • Supported OS:
  • T4K Cleanup
  • Installation, Upgrade, Removal of Plugins
  • With krew:
  • Without krew:
  • Usage:
  • Examples

Was this helpful?

  1. Krew Plugins

T4K Cleanup Plugin

tvk-cleanup is a kubectl plugin that uninstalls the Trilio Operator, Application, Custom Resources, and CRDs in a Kubernetes cluster.

PreviousT4K Log Collector PluginNextTroubleshooting Guide

Was this helpful?

Prerequisites:

  1. krew - kubectl-plugin manager. Install from .

  2. kubectl - kubernetes command-line tool. Install from .

For openshift environments, if kubectl is not installed and oc binary is installed on host machine, then oc binary can be used to perform kubectl operation by creating symlink with -

sudo ln -s /usr/local/bin/oc /usr/local/bin/kubectl
  • oc binary path can found by executing which oc

  • To delete/remove symbolic links use either unlink or rm command:

unlink /usr/local/bin/kubectl

Supported OS:

  • Linux

  • darwin

T4K Cleanup

This plugin cleans up all T4K Custom Resources, CRDs, and T4K application itself from all the namespace. It cleans up T4K installed as operator (on OCP platform) and as helm chart on upstream k8s (Rancher) cluster.

Please note the following:

  • Ensure kubectl utility is present on system

  • Ensure kubectl is pointed to k8s cluster (i.e can access the remote target cluster)

  • Ensure helm utility is present on system and pointed to the cluster

    • helmVersion=~v3 is needed on the cluster

  • Ensure minimum Kubernetes version >= 1.18.x

  • Cleans up all the Trilio Custom Resources, Trilio Manager application and CRDs from all the namespaces

  • User can select to delete any or all of

    1. Trilio Application (Operator or Helm chart)

    2. Trilio CRDs

    3. Trilio Customer Resources as listed here - Restore Backup Backupplan Hook Target Policy License

Installation, Upgrade, Removal of Plugins

With krew:

  • Add T4K custom plugin index of krew:

    kubectl krew index add tvk-plugins https://github.com/trilioData/tvk-plugins.git
  • Installation:

    kubectl krew install tvk-plugins/tvk-cleanup
  • Upgrade:

    kubectl krew upgrade tvk-cleanup
  • Removal:

    kubectl krew uninstall tvk-cleanup

Without krew:

  1. Choose a version of preflight plugin to install and check if release assets have preflight plugin's package[cleanup.tar.gz]

  2. Set env variable version=v1.x.x [update with your desired version]. If version is not exported, latest tagged version will be considered.

Linux/macOS

  • Bash or ZSH shells:

(
  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
)

Verify installation with kubectl tvk-cleanup --help

Windows

NOT SUPPORTED\

Usage:

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 License

Examples

  • Interactive, Cleans up all:

kubectl tvk-cleanup -t -c -r
  • Non-interactive, Cleans up all:

kubectl tvk-cleanup -n -t -c -r
  • Non-interactive, Cleans up only Trilio Manager or Operator:

kubectl tvk-cleanup -n -t
  • Non-interactive, Cleans up only Trilio CRDs

kubectl tvk-cleanup -n -c
  • Non-interactive, Cleans up only specified Trilio CRs

kubectl tvk-cleanup -n -r "Restore Backup Backupplan"

List of available releases:

here
here
https://github.com/trilioData/tvk-plugins/releases