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
2 Likes

Nice summary for Minio activation!!!

Addon minio was not found in any repository. I worked with stable and edge and still didn’t show up

shawn@forest:~$ sudo snap refresh microk8s --classic --channel=1.27/edge
microk8s (1.27/edge) v1.27.1 from Canonical✓ refreshed

shawn@forest:~$ microk8s status
microk8s is running
high-availability: no
  datastore master nodes: 127.0.0.1:19001
  datastore standby nodes: none
addons:
  enabled:
    community            # (core) The community addons repository
    dashboard            # (core) The Kubernetes dashboard
    dns                  # (core) CoreDNS
    ha-cluster           # (core) Configure high availability on the current node
    ingress              # (core) Ingress controller for external access
    metrics-server       # (core) K8s Metrics Server for API access to service metrics
  disabled:
    argocd               # (community) Argo CD is a declarative continuous deployment for Kubernetes.
    cilium               # (community) SDN, fast with full network policy
    dashboard-ingress    # (community) Ingress definition for Kubernetes dashboard
    fluentd              # (community) Elasticsearch-Fluentd-Kibana logging and monitoring
    inaccel              # (community) Simplifying FPGA management in Kubernetes
    istio                # (community) Core Istio service mesh services
    jaeger               # (community) Kubernetes Jaeger operator with its simple config
    kata                 # (community) Kata Containers is a secure runtime with lightweight VMS
    keda                 # (community) Kubernetes-based Event Driven Autoscaling
    knative              # (community) The Knative framework on Kubernetes.
    linkerd              # (community) Linkerd is a service mesh for Kubernetes and other frameworks
    multus               # (community) Multus CNI enables attaching multiple network interfaces to pods
    openebs              # (community) OpenEBS is the open-source storage solution for Kubernetes
    openfaas             # (community) OpenFaaS serverless framework
    portainer            # (community) Portainer UI for your Kubernetes cluster
    starboard            # (community) Kubernetes-native security toolkit
    traefik              # (community) traefik Ingress controller
    gpu                  # (core) Automatic enablement of Nvidia CUDA
    helm                 # (core) Helm 2 - the package manager for Kubernetes
    helm3                # (core) Helm 3 - Kubernetes package manager
    host-access          # (core) Allow Pods connecting to Host services smoothly
    hostpath-storage     # (core) Storage class; allocates storage from host directory
    mayastor             # (core) OpenEBS MayaStor
    metallb              # (core) Loadbalancer for your Kubernetes cluster
    prometheus           # (core) Prometheus operator for monitoring and logging
    rbac                 # (core) Role-Based Access Control for authorisation
    registry             # (core) Private image registry exposed on localhost:32000
    storage              # (core) Alias to hostpath-storage add-on, deprecated

shawn@forest:~$ microk8s enable minio
Addon minio was not found in any repository

Issues fixed. I had to

microk8s stop
sudo snap remove microk8s 
sudo snap install microk8s --classic --channel=1.27
microk8s start
microk8s minio

When upgrading from an older version to a new version the add-on list is not updated…