Documentation

Documentation

Delete a MinIO Tenant

Table of Contents

Prerequisites

MinIO Kubernetes Operator and Plugin

This procedures on this page requires a valid installation of the MinIO Kubernetes Operator and assumes the local host has a matching installation of the MinIO Kubernetes Operator. This procedure assumes the latest stable Operator and Plugin version 4.5.2.

See Deploy the MinIO Operator for complete documentation on deploying the MinIO Operator.

You can install the MinIO plugin using either the Kubernetes Krew plugin manager or manually by downloading and installing the plugin binary to your local host:

Krew is a kubectl plugin manager developed by the Kubernetes SIG CLI group. See the krew installation documentation for specific instructions. You can use the Krew plugin for Linux, MacOS, and Windows operating systems.

You can use Krew to install the MinIO kubectl plugin using the following commands:

kubectl krew update
kubectl krew install minio

You can validate the installation of the MinIO plugin using the following command:

kubectl minio version

The output should match 4.5.2.

You can download the MinIO kubectl plugin to your local system path. The kubectl CLI automatically discovers and runs compatible plugins.

The following code downloads the latest stable version 4.5.2 of the MinIO Kubernetes plugin and installs it to the system path:

curl https://github.com/minio/operator/releases/download/4.5.2/kubectl-minio_4.5.2_linux_amd64 -o kubectl-minio
chmod +x kubectl-minio
mv kubectl-minio /usr/local/bin/

The mv command above may require sudo escalation depending on the permissions of the authenticated user.

Run the following command to verify installation of the plugin:

kubectl minio version

The output should display the Operator version as 4.5.2.

You can download the MinIO kubectl plugin to your local system path. The kubectl CLI automatically discovers and runs compatible plugins.

The following PowerShell command downloads the latest stable version 4.5.2 of the MinIO Kubernetes plugin and installs it to the system path:

Invoke-WebRequest -Uri "https://github.com/minio/operator/releases/download/v4.5.2/kubectl-minio_4.5.2_windows_amd64.exe" -OutFile "C:\kubectl-plugins\kubectl-minio.exe"

Ensure the path to the plugin folder is included in the Windows PATH.

Run the following command to verify installation of the plugin:

kubectl minio version

The output should display the Operator version as 4.5.2.

Procedure (CLI)

Use the kubectl minio tenant delete command to delete a MinIO Tenant and its associated resources.

The delete behavior of each Persistent Volume Claims (PVC) generated by the Tenant depends on the Reclaim Policy of its bound Persistent Volume (PV):

  • For recycle or delete policies, the command deletes the PVC.

  • For retain, the command retains the PVC.

Warning

Deletion of the underlying PV, whether automatic or manual, results in the loss of any objects stored on the MinIO Tenant.

Perform all due diligence in ensuring the safety of stored data prior to deleting the Tenant.

kubectl minio tenant delete TENANT_NAME \
              --namespace TENANT_NAMESPACE
  • Replace TENANT_NAME with the name of the Tenant.

  • Replace TENANT_NAMESPACE with the namespace of the Tenant.

The command includes a confirmation prompt that requires explicit approval of the delete operation.