/minio-operator

MinIO Operator for k8s https://kubernetes.io/

Primary LanguageGoGNU Affero General Public License v3.0AGPL-3.0

MinIO Operator Guide Slack Docker Pulls

MinIO is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. MinIO is designed in a cloud-native manner to scale sustainably in multi-tenant environments. Orchestration platforms like Kubernetes provide perfect launchpad for MinIO to scale. There are multiple options to deploy MinIO on Kubernetes:

  • Helm Chart: MinIO Helm Chart offers customizable and easy MinIO deployment with a single command. Refer MinIO Helm Chart repository documentation for more details.

  • YAML File: MinIO can be deployed with yaml files via kubectl. Refer MinIO yaml file documentation to deploy MinIO using yaml files.

  • MinIO-Operator: Operator creates and manages distributed MinIO deployments running on Kubernetes, using CustomResourceDefinitions and Controller.

Getting Started

Prerequisites

  • Kubernetes version v1.15.5 and above.
  • kubectl configured to refer to a Kubernetes cluster.

Create Operator and related resources

To start MinIO-Operator, use the docs/minio-operator.yaml file.

kubectl create -f https://raw.githubusercontent.com/minio/minio-operator/master/minio-operator.yaml

This will create all relevant resources required for the Operator to work. Here is a list of resources created by above yaml file:

  • Namespace: Custom namespace for MinIO-Operator. By default it is named as minio-operator-ns.
  • CustomResourceDefinition: Custom resource definition named as minioinstances.miniocontroller.min.io.
  • ClusterRole: A cluster wide role for the controller. It is named as minio-operator-role. This is used for RBAC.
  • ServiceAccount: Service account is used by the custom controller to access the cluster. Account name by default is minio-operator-sa.
  • ClusterRoleBinding: This cluster wide binding binds the service account minio-operator-sa to cluster role minio-operator-role.
  • Deployment: Deployment creates a pod using the MinIO-Operator Docker image. This is where the custom controller runs and looks after any changes in custom resource.

Environment variables

These variables may be passed to operator Deployment in order to modify some of its parameters

name default description
WATCHED_NAMESPACE If set, the operator will watch only MinIO resources deployed in the specified namespace. All namespaces are watched if empty

Create a MinIO instance

Once MinIO-Operator deployment is running, you can create MinIO instances using the below command

kubectl create -f https://raw.githubusercontent.com/minio/minio-operator/master/examples/minioinstance.yaml

Features

MinIO-Operator currently supports following features:

  • Create and delete highly available distributed MinIO clusters.
  • Upgrading existing distributed MinIO clusters.

Refer minioinstance.yaml for details on how to pass supported fields to the operator.

Upcoming features

  • Bucket Expansion Support
  • Federation and CoreDNS
  • Continuous remote site mirroring with mc mirror

Explore Further