Step by Step Guide to Deploying MinIO on Docker and Kubernetes

Posted By : Harsh Kumar | 22-Sep-2020

Deploying MinIO on Docker and Kubernetes

 

 

MinIO, an open-source object storage server that offers high-performance and distributed storage facilities designed for large-scale data infrastructures. It is compatible with S3 API and it is built from scratch with a private cloud as its target. As it is open-source that means it has a widely active community worldwide. This blog post provides a comprehensive guide to deploying MinIO on Docker and Kubernetes for developers to manage storage and instances seamlessly. 

 

We, at Oodles, as an evolving AI and Computer Vision Development Company, deploy advanced DevOps frameworks like Docker, Kubernetes, MinIO, and more to build mission-critical AI solutions. 

 

Simply, the MinIO servers stores all types of unstructured data (photos, videos, documents, log files, time-series data, etc). These data are store via the HTTP method PUT and accessed via GET, and removed by DELETE. There various ways to deploy MinIO on your server and can be used by the built-in browser. To make it simple, the browser will allow you to create buckets and upload or view objects.

 

Here we are going to see different ways to deploy a MinIO server.

 

Method 1. Simple deployment of MinIO on a Linux server.

 

Step1. Download MinIO server package

 

 

$ wget https://dl.minio.io/server/minio/release/linux-amd64/minio

 

Step2. Make the downloaded file executable

 

 

$ chmod +x minion 

 

Step3. Start the MinIO server

 

 

$ sudo ./minio server /minio

 

MinIO configuration file.

 

Note: You can change the Secret key an Access key by making changes in MinIO configuration file.

 

Open the browser and check the 9000 port of the server.

 

Access key and secret key retrieved

 

 

Now Paste the Access key and secret key retrieved in step3 and then click on the arrow icon to log in.

 

Docker and Kubernetes login

 

 

After successful login, you will see a page like this

 

upload unstructured objects.

 

 

 

Now, you create a bucket by clicking the red plus (+) icon at the bottom right corner and upload unstructured objects.

 

Method 2. Deploy MinIO on Docker.

 

$ docker run -p 9000:9000 \
  -e "MINIO_ACCESS_KEY=<Any Access key>" \
  -e "MINIO_SECRET_KEY=<Any secret key>" \
  minio/minio server /data

 

 

Deploy MinIO on Docker

 

Now use the provided Access key and Secret key to login on a browser and enjoy using MinIO.

 

Note: you can use -v path-to-dir:/data in command to attach a persistent volume.

 

Method 3. Deploy MinIO on Kubernetes

 

The best way to deploy MinIO on Kubernetes is by helm chart.

 

Step1. Install helm in your Kubernetes cluster.

 

Step2. Install MinIO using this chart

 

 

$ helm install --set accessKey=myaccesskey,secretKey=mysecretkey \
    stable/minio

 

 

Step3. Access the MinIO from the localhost.

In this case, we are using Port forwarding. (You can create a service like nodeport or load balancer too)

 
 
$ kubectl get pod
 

copy the name of MinIO pod and forward the port to 9000

 
$ kubectl port-forward <POD_NAME> 9000 --namespace default

 

 

 

MinIO on localhost:9000

 

Step4. Now access the MinIO on localhost:9000

 

You can change various configurations while deploying MinIO or after deployment. For that please go to its official Github page https://github.com/helm/charts/tree/master/stable/minio

Now for the Automation and other stuff, there is a MinIO client (a command-line interface). There are various commands with “mc” to control and manage deployed MinIO.

 

Installing MinIO client on a server:

 

Step1. Download the client package

 

 

 

$ wget https://dl.minio.io/client/mc/release/linux-amd64/mc

 

Step2. Make the downloaded file executable

 

 

$ chmod +x mc

 

To get the different option with mc command use

 

 

$ ./mc help

 

Step3. Configuring MinIO client with MinIO instance running on the server.

 

 

$ ./mc config host add minio http://127.0.0.1:9000 Your_Access_key YourSecret_key

 

command to use MinIO

 

 

Some useful command to use MinIO

 

 

To list all buckets

 

./mc ls <server-name>

 

To cat a file

 

./mc cat <server-Name>/<bucket-Name>/<file-Name>

 

To make a new bucket

 

 

./mc mb <server-Name>/<bucket-Name>

 

Conclusion

Now you have your own MinIO storage server. You have learned different methods to deploy MinIO. The above methods are the simplest ways to deploy MinIO to make you go. There are some other ways to make it more effective. But these are the best ways to start with.


At Oodles, we are a team of seasoned AI developers capable of deploying dynamic AI and machine learning applications on Docker and Kubernetes. Established as a Chatbot Development Company, we can also build domain-specific virtual assistants for banking, e-learning portals, healthcare businesses, and other sectors.

Request For Proposal

Sending message..

Ready to innovate ? Let's get in touch

Chat With Us