Jump to main content

Addon: MinIO

1.26
Compatibility: amd64 arm64
Source: See MinIO documentation

MinIO is a well-known and established project in the CNCF ecosystem that provides cloud-agnostic S3-compatible object storage. It is free, open-source and well-trusted by multiple organizations.

The minio addon can be used to deploy MinIO on a MicroK8s cluster using minio-operator, as well as the kubectl-minio CLI tool for managing the deployment. Optionally, this addon deploys a single MinIO tenant so that you can get started using it out of the box. The default tenant can be configured (storage capacity, number of volumes, security) using command-line arguments when enabling the addon (see below).

The MinIO addon can use the simple hostpath storage for single-node clusters, or any storage class you decide for multi-node clusters.

Enable

For single-node development clusters, enable the MinIO add-on with a single command:

sudo microk8s enable minio

For a more advanced use-case (see sudo microk8s enable minio:-h for a list of all supported arguments), that deploys a MinIO tenant with 300GB storage capacity using the ceph-xfs storage class:

sudo microk8s enable minio -c 300Gi -s ceph-xfs

Alternatively, you can disable the creation of a default tenant and only deploy the MinIO operator with:

sudo microk8s enable minio -k

Access S3 endpoint and MinIO console

After deployment, the output prints the generated username and password, as well as the services created for the default tenant:

+ /var/snap/microk8s/common/plugins/kubectl-minio tenant create microk8s --storage-class microk8s-hostpath --capacity 20Gi --servers 1 --volumes 1 --namespace minio-operator --enable-audit-logs=false --disable-tls --enable-prometheus=false
W1129 22:39:53.272142   28741 warnings.go:70] unknown field "spec.pools[0].volumeClaimTemplate.metadata.creationTimestamp"

Tenant 'microk8s' created in 'minio-operator' Namespace

  Username: 1PTKT0CBT0E09W4NRL9T
  Password: sNgS1BYtquuF1DO8v0Gdsfvp2g2L5LgCRm7QFMqB
  Note: Copy the credentials to a secure location. MinIO will not display these again.

APPLICATION	SERVICE NAME    	NAMESPACE     	SERVICE TYPE	SERVICE PORT
MinIO      	minio           	minio-operator	ClusterIP   	80
Console    	microk8s-console	minio-operator	ClusterIP   	9090

You can use the supplied username and password to access and manage the tenant using the MinIO console. Create a port-forward for the MinIO console with the following command, and follow the instructions:

sudo microk8s kubectl-minio proxy

Using kubectl-minio

For second-day operations, like extending the default tenant with more storage capacity, it is highly recommended to use the kubectl-minio tool. The tool is installed when enabling the addon. A convenience command microk8s kubectl-minio will be available after enabling the add-on:

sudo microk8s kubectl-minio --help

For example, to list all active MinIO tenants:

sudo microk8s kubectl-minio tenant list

which produces output similar to:

Tenant 'microk8s', Namespace 'minio-operator', Total capacity 20 GiB

  Current status: Initialized
  MinIO version: minio/minio:RELEASE.2022-09-17T00-09-45Z

Last updated 1 year, 5 months ago. Help improve this document in the forum.