kubectl minio tenant expand
Description
Command Requires MinIO Operator
Use the following command to validate that the operator is online and available prior to running this command:
kubectl get deployments -A --field-selector metadata.name=minio-operator
Issue the kubectl minio init command to initiate the operator
if it is not already running in the Kubernetes cluster.
Extends the total capacity of a MinIO Tenant by adding a new Pool. A Pool consists of an independent set of pods running the MinIO Server and MinIO Console. The new pool uses the same MinIO Server and Console Docker images as the existing Tenant pool(s).
Syntax
The following example expands a MinIO Tenant with a Pool consisting of 4 MinIO servers with 8 drives each and a total additional capacity of 32Ti:
kubectl minio tenant expand \
minio-tenant-1 \
--servers 4 \
--volumes 8 \
--capacity 32Ti \
--namespace minio-tenant-1 \
--storage-class local-storage
The command has the following syntax:
kubectl minio tenant expand \
TENANT_NAME \
--capacity \
--namespace \
--servers \
--volumes | --volumes-per-server \
[--output] \
[--pool] \
[--storage-class]
Brackets
[]indicate optional parameters.Parameters sharing a line are mutually dependent.
Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Flags
The command supports the following flags:
- --capacity
- Optional
- The total capacity of the new MinIO Tenant Pool.
kubectl miniodivides the capacity by the number of--volumesto determine the amount of
resources.requests.storageto set for each Persistent Volume Claim (PVC).
If the existing Persistent Volumes (
PV) can satisfy the requested storage,kubectl minio tenant expandhangs and waits until the required storage exists. - The total capacity of the new MinIO Tenant Pool.
- --servers
- Required
The number of
minioservers to deploy in the new MinIO Tenant Pool.Ensure that the specified number of
--serversdoes not exceed the number of available nodes in the Kubernetes cluster.
- --volumes
- Required
Mutually exclusive with
--volumes-per-server. Use either--volumesor--volumes-per-server.The number of volumes in the new MinIO Tenant Pool.
kubectl miniogenerates one Persistent Volume Claim (PVC) for each volume.The number of volumes affects both the requested storage of each
PVCand the number ofPVCsto associate to each MinIO Pod in the new Pool:The command
kubectl miniodivides the--capacityby the number of volumes to determine the amount ofresources.requests.storageto set for eachPVC.kubectl miniodetermines the number ofPVCsto associate to eachminioserver by dividing--volumesby--servers.
The command generates each
PVCwith Pod-specific selectors, such that each Pod only usesPVsthat are locally-attached to the node running that Pod.If the specified number of volumes exceeds the number of unbound
PVsavailable in the cluster,kubectl minio tenant expandhangs and waits until the requiredPVsexist.
- --volumes-per-server
- Required
Mutually exclusive with
--volumes. Use either--volumes-per-serveror--volumes.Number of volumes to use for each server in the pool.
Similar to
--volumes, but instead of specifying the total number of volumes for all MinIO servers, associate--volumes-per-servervolumes to each server.If the combined total number of volumes exceeds the number of unbound
PVsavailable on the cluster,kubectl minio tenant expandhangs and waits until the requiredPVsexist.
- --namespace
- Optional
The namespace in which to create the new MinIO Tenant Pool. The namespace must match that of the MinIO Tenant being extended.
Defaults to
minio.
- --output
- Optional
Outputs the generated
YAMLobjects toSTDOUTfor further customization.--outputdoes not create the new MinIO Tenant Pool. Usekubectl apply -f <FILE>to manually create the MinIO tenant using the generated file.
- --storage-class
- Optional
The name of the Kubernetes Storage Class to use when creating Persistent Volume Claims (
PVC) for the new MinIO Tenant Pool. The specified--storage-classmust match thestorage-classof the Persistent Volumes (PVs) to which thePVCsshould bind.MinIO strongly recommends creating a Storage Class that corresponds to locally-attached volumes on the host machines on which the Tenant deploys. This ensures each pod can use locally-attached storage for maximum performance and throughput. See the Deploy MinIO Tenant tutorial for guidance on creating Storage Classes for supporting the MinIO Tenant.