[Kubernetes (K8S)] Helm install Minio distributed Object Storage compatible with Amazon S3 within Kubernetes (K8S)

kube-prometheus stack

MinIO is a High Performance Object Storage released under Apache License v2.0. It is API compatible with Amazon S3 cloud storage service. Use MinIO to build high performance infrastructure for machine learning, analytics and application data workloads.

MinIO supports distributed mode. In distributed mode, you can pool multiple drives (even on different machines) into a single object storage server.

This article is about how to use Helm to deploy Minio on Kubernetes (K8S).

Prerequisites

  • Kubernetes (K8S)
    Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.

    For more information about installing and using Kubernetes (K8s), see the Kubernetes (K8s) Docs.

  • Helm
    Helm is the best way to find, share, and use software built for Kubernetes.

    For more information about installing and using Helm, see the Helm Docs.

Installation

Custom Values.yaml

Remember to replace the content within < > with your info.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# values.yaml

# charts/minio at master · minio/charts
# https://github.com/minio/charts/blob/master/minio/values.yaml

## minio server mode, i.e. standalone or distributed.
## Distributed Minio ref: https://docs.minio.io/docs/distributed-minio-quickstart-guide
##
mode: distributed

## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:

## minio data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
## Storage class of PV to bind. By default it looks for standard storage class.
## If the PV uses a different storage class, specify that here.
storageClass: <Your storageClassName>
size: 5Gi

ingress:
enabled: true

annotations:
kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# kubernetes.io/ingress.allow-http: "false"
# kubernetes.io/ingress.global-static-ip-name: ""
# nginx.ingress.kubernetes.io/secure-backends: "true"
# nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
# nginx.ingress.kubernetes.io/whitelist-source-range: 0.0.0.0/0

hosts:
- <Your Minio Host>
tls:
- secretName: cert-manager-webhook-dnspod-letsencrypt
hosts:
- <Your Minio Host>

## Create a bucket after minio install
##
defaultBucket:
enabled: true
## If enabled, must be a string with length > 0
name: default-bucket
## Can be one of none|download|upload|public
policy: none
## Purge if bucket exists already
purge: false
## set versioning for bucket true|false
# versioning: false

## Create multiple buckets after minio install
## Enabling `defaultBucket` will take priority over this list
##
buckets:
- name: another-bucket
policy: none
purge: false
versioning: true
# - name: bucket2
# policy: none
# purge: false

metrics:
# Metrics can not be disabled yet: https://github.com/minio/minio/issues/7493
serviceMonitor:
enabled: true

Install by Helm

Helm install minio into minio namespace.

1
2
3
4
5
6
7
8
9
10
11
# crate namespace:
$ kubectl create namespace minio

# Add the Helm repository:
$ helm repo add minio https://helm.min.io/

# Update your local Helm chart repository cache:
$ helm repo update

# To install Helm chart:
$ helm install minio minio/minio -n minio -f values.yaml

See Helm release about minio.

1
2
3
$ helm list --namespace minio
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
minio minio 4 2020-10-10 16:44:15.426834 +0800 +0800 deployed minio-8.0.2 master

See pods about minio.

1
2
3
4
5
6
$ kubectl get pods -n kube-prometheus-stack
NAME READY STATUS RESTARTS AGE
minio-0 0/1 Running 0 4d10h
minio-1 1/1 Running 0 2d18h
minio-2 1/1 Running 0 2d18h
minio-3 1/1 Running 0 2d18h

Then, you can visit Minio with https://

References

[1] helm-charts/charts/kube-prometheus-stack at main · prometheus-community/helm-charts - https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack

[2] Deploy MinIO on Kubernetes - https://docs.min.io/docs/deploy-minio-on-kubernetes.html

[3] MinIO | High Performance, Kubernetes Native Object Storage - https://min.io/

[4] Helm - https://helm.sh/

[5] Kubernetes - https://kubernetes.io/