Documentation

Documentation

kubectl minio tenant create

Table of Contents

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.

kubectl minio tenant create adds a new MinIO tenant and associated resources to a Kubernetes cluster. The Operator Console provides a rich user interface for deploying and managing MinIO Tenants.

create always uses the latest stable version of the MinIO Server and MinIO Console.

On success, the command returns the following:

  • The administrative username and password for the Tenant.

    Important

    Store these credentials in a secure location, such as a password protected key manager. MinIO does not show these credentials again.

  • The Service created for connecting to the MinIO Console. The Console supports administrative operations on the Tenant, such as configuring Identity and Access Management (IAM) and bucket configurations.

  • The Service created for connecting to the MinIO Tenant. Applications should use this service for performing operations against the MinIO Tenant.

Syntax

The following example creates a MinIO Tenant in the namespace minio-tenant-1 consisting of 4 MinIO servers with 8 drives each and a total capacity of 32Ti.

kubectl minio tenant create                             \
                     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 create                  \
                     TENANT_NAME             \
                     --capacity              \
                     --servers               \
                     --volumes               \
                     [--enable-host-sharing] \
                     [--image]               \
                     [--image-pull-secret]   \
                     [--kes-config]          \
                     [--namespace]           \
                     [--output]              \
                     [--storage-class]

Flags

The command supports the following flags:

TENANT_NAME
Required

The name of the MinIO tenant which the command creates. The name must be unique in the --namespace.

--capacity
Required

Total raw capacity of the MinIO tenant, such as 16Ti. Include a string that is a number and a standard storage capacity unit.

The total capacity of the MinIO tenant. kubectl minio divides the capacity by the number of --volumes to determine the amount of resources.requests.storage to set for each Persistent Volume Claim (PVC).

If no Persistent Volumes (PV) can satisfy the requested storage, kubectl minio tenant create hangs and waits until the required storage exists.

--servers
Required

The number of minio servers to deploy on the Kubernetes cluster.

Ensure that the specified number of --servers does not exceed the number of nodes in the Kubernetes cluster.

--volumes
Required

Total number of volumes to use in the MinIO tenant.

kubectl minio tenant create generates one Persistent Volume Claim (PVC) for each volume.

The number of volumes affects both the requested storage of each PVC and the number of PVC to associate to each MinIO Pod in the cluster:

The command generates each PVC with Pod-specific selectors, such that each Pod only uses PV that are locally-attached to the node running that Pod.

If the specified number of volumes exceeds the number of unbound PV available on the cluster, kubectl minio tenant create hangs and waits until the required PV exist.

--enable-host-sharing
Optional

Important

To be used in testing environments only. This flag is not supported in production environments.

Disable pod anti-affinity to allow co-location of pods on a single node.

--image
Optional

MinIO image to use for the tenant. Defaults to the latest minio release.

--image-pull-secret
Optional

The image secret to use for pulling MinIO.

--kes-config
Optional

The name of the Kubernetes Secret which contains the MinIO Key Encryption Service (KES) configuration. Required for enabling Server Side Encryption of objects (SSE-S3).

For more, see the Github documentation.

--namespace
Optional

The namespace in which to create the MinIO Tenant and its associated resources.

MinIO supports exactly one MinIO Tenant per namespace. Create a unique namespace for each MinIO Tenant deployed into the cluster.

Defaults to minio.

--output
Optional

Dry run the command and generate the YAML.

--output does not create the MinIO Tenant. Use kubectl apply -f <FILE> to manually create the MinIO tenant using the generated file.

--storage-class
Optional

The type of storage to use for this tenant.

The name of the Kubernetes Storage Class to use when creating Persistent Volume Claims (PVC) for the MinIO Tenant. The specified --storage-class must match the storage-class of the Persistent Volumes (PVs) to which the PVCs should 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.

Defaults to default.