Gaming industry under DDoS attack. Get DDoS protection now. Start onboarding
  1. Home
  2. Developers
  3. Deploying highly scalable cloud storage with Rook, Part 2 (MinIO Storage)

Deploying highly scalable cloud storage with Rook, Part 2 (MinIO Storage)

  • By Gcore
  • March 27, 2023
  • 3 min read
Deploying highly scalable cloud storage with Rook, Part 2 (MinIO Storage)

Last time we talked about deploying a Ceph cluster with block storage using Rook. Today we are going to dive into discussing a different type of storage method that Rook provides and what it’s use case and benefits are.

What is MinIO?

MinIO is a high-performance object store that is compatible with Amazon S3 and is native to the technologies and architectures that define the cloud. These technologies include containerization, orchestration with Kubernetes, microservices, and multi-tenancy. No other object store is more Kubernetes-friendly.

MinIO is 100% open source under the Apache V2 license. This means that MinIO’s customers are free from lock in, free to inspect, free to innovate, free to modify and free to redistribute.

One of the many options for cloud-native storage solutions that Rook provides is object-storage with MinIO. Let us go through a demonstration of how we would go about deploying MinIO with Rook to a K8s cluster.

Deploying MinIO with Rook

MinIO is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. Rook provides an operator to deploy and manage MinIO clusters.

Prerequisites

A Kubernetes cluster is necessary to run the Rook MinIO operator. To make sure you have a Kubernetes cluster that is ready for Rook, you can follow these instructions.

Deploy the MinIO Operator

First deploy the Rook MinIO operator using the following commands:

git clone --single-branch --branch release-1.2 https://github.com/rook/rook.gitcd cluster/examples/kubernetes/miniokubectl create -f operator.yaml

You can check if the operator is up and running with:

kubectl -n rook-minio-system get pod

Create and Initialize a Distributed MinIO Object Store

Now that the operator is running, we can create an instance of a distributed MinIO object store by creating an instance of the objectstore.minio.rook.io resource. Some of that resource’s values are configurable, so feel free to browse object-store.yaml and tweak the settings to your liking.

It is strongly recommended to update the values of accessKey and secretKey in object-store.yaml to a secure key pair, as described in the MinIO client quickstart guide.

When you are ready to create a MinIO object store, simply run:

kubectl create -f object-store.yaml

We can verify that a Kubernetes object has been created that represents our new MinIO object store with the command below. This is important because it shows that Rook has successfully extended Kubernetes to make MinIO object stores a first class citizen in the Kubernetes cloud-native environment.

kubectl -n rook-minio get objectstores.minio.rook.io

To check if all the desired replicas are running, you should see the same number of entries from the following command as the replica count that was specified in object-store.yaml:

kubectl -n rook-minio get pod -l app=minio,objectstore=my-store

Accessing the Object Store

MinIO comes with an embedded web based object browser. In the example, the object store we have created can be exposed external to the cluster at the Kubernetes cluster IP via a “NodePort”. We can see which port has been assigned to the service via:

kubectl -n rook-minio get service minio-my-store -o jsonpath='{.spec.ports[0].nodePort}'

If you are using Minikube, you can get your cluster IP via minikube ip. The full address of the MinIO service when using Minikube can be obtained with the following:

echo http://$(minikube ip):$(kubectl -n rook-minio get service minio-my-store -o jsonpath='{.spec.ports[0].nodePort}')

Copy-paste the full address and port into an internet browser and you will be taken to the MinIO web console login page, as shown in the screenshot below:

Clean up

To clean up all resources associated with this walk-through, you can run the commands below.

NOTE: This will destroy your MinIO object store and delete all of its associated data.

kubectl delete -f object-store.yamlkubectl delete -f operator.yaml

Troubleshooting

If the MinIO cluster does not come up, the first step would be to examine the operator’s logs:

kubectl -n rook-minio-system logs -l app=rook-minio-operator

If everything looks OK in the operator logs, you can also look in the logs for one of the MinIO instances. Assuming your object-store.yaml file named it “my-store”, each node in the cluster can be inspected via:

kubectl -n rook-minio logs my-store-0

Feel free to modify the above to inspect other instances.

Moving on

In the next part of this series, we are going to go over the steps and benefits of deploying a CockroachDB storage solution with Rook. See you then!

Discover more with Gcore Managed Kubernetes

Related articles

What's the difference between multi-cloud and hybrid cloud?

Multi-cloud and hybrid cloud represent two distinct approaches to distributed computing architecture that build upon the foundation of cloud computing to help organizations improve their IT infrastructure.Multi-cloud environments involve us

What is multi-cloud? Strategy, benefits, and best practices

Multi-cloud is a cloud usage model where an organization utilizes public cloud services from two or more cloud service providers, often combining public, private, and hybrid clouds, as well as different service models, such as Infrastructur

What is cloud migration? Benefits, strategy, and best practices

Cloud migration is the process of transferring digital assets, such as data, applications, and IT resources, from on-premises data centers to cloud platforms, including public, private, hybrid, or multi-cloud environments. Organizations can

What is a private cloud? Benefits, use cases, and implementation

A private cloud is a cloud computing environment dedicated exclusively to a single organization, providing a single-tenant infrastructure that improves security, control, and customization compared to public clouds.Private cloud environment

What is a cloud GPU? Definition, types, and benefits

A cloud GPU is a remotely rented graphics processing unit hosted in a cloud provider's data center, accessible over the internet via APIs or virtual machines. These virtualized resources allow users to access powerful computing capabilities

What is cloud networking: benefits, components, and implementation strategies

Cloud networking is the use and management of network resources, including hardware and software, hosted on public or private cloud infrastructures rather than on-premises equipment. Over 90% of enterprises are expected to adopt cloud netwo

Subscribe to our newsletter

Get the latest industry trends, exclusive insights, and Gcore updates delivered straight to your inbox.