0b17b07bf6 | ||
---|---|---|
.. | ||
templates | ||
.helmignore | ||
Chart.yaml | ||
README.md | ||
values.yaml |
README.md
MinIO
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.
For more detailed documentation please visit here
Introduction
This chart bootstraps MinIO deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.4+ with Beta APIs enabled for default standalone mode.
- Kubernetes 1.5+ with Beta APIs enabled to run MinIO in distributed mode.
- PV provisioner support in the underlying infrastructure.
Configure MinIO Helm repo
$ helm repo add minio https://helm.min.io/
Installing the Chart
Install this chart using:
$ helm install --namespace minio --generate-name minio/minio
The command deploys MinIO on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Release name
An instance of a chart running in a Kubernetes cluster is called a release. Each release is identified by a unique name within the cluster. Helm automatically assigns a unique release name after installing the chart. You can also set your preferred name by:
$ helm install my-release minio/minio
Access and Secret keys
By default a pre-generated access and secret key will be used. To override the default keys, pass the access and secret keys as arguments to helm install.
$ helm install --set accessKey=myaccesskey,secretKey=mysecretkey --generate-name minio/minio
Uninstalling the Chart
Assuming your release is named as my-release
, delete it using the command:
$ helm delete my-release
or
$ helm uninstall my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Upgrading the Chart
You can use Helm to update MinIO version in a live release. Assuming your release is named as my-release
, get the values using the command:
$ helm get values my-release > old_values.yaml
Then change the field image.tag
in old_values.yaml
file with MinIO image tag you want to use. Now update the chart using
$ helm upgrade -f old_values.yaml my-release minio/minio
Default upgrade strategies are specified in the values.yaml
file. Update these fields if you'd like to use a different strategy.
Configuration
The following table lists the configurable parameters of the MinIO chart and their default values.
Parameter | Description | Default |
---|---|---|
image.repository |
Image repository | minio/minio |
image.tag |
MinIO image tag. Possible values listed here. | RELEASE.2020-11-06T23-17-07Z |
image.pullPolicy |
Image pull policy | IfNotPresent |
extraArgs |
Additional command line arguments to pass to the MinIO server | [] |
accessKey |
Default access key (5 to 20 characters) | random 20 chars |
secretKey |
Default secret key (8 to 40 characters) | random 40 chars |
mountPath |
Default mount location for persistent drive | /export |
bucketRoot |
Directory from where minio should serve buckets. | Value of .mountPath |
persistence.enabled |
Use persistent volume to store data | true |
persistence.size |
Size of persistent volume claim | 500Gi |
persistence.existingClaim |
Use an existing PVC to persist data | nil |
persistence.storageClass |
Storage class name of PVC | nil |
persistence.accessMode |
ReadWriteOnce or ReadOnly | ReadWriteOnce |
persistence.subPath |
Mount a sub directory of the persistent volume if set | "" |
environment |
Set MinIO server relevant environment variables in values.yaml file. MinIO containers will be passed these variables when they start. |
MINIO_STORAGE_CLASS_STANDARD: EC:4" |
Some of the parameters above map to the env variables defined in the MinIO DockerHub image.
You can specify each parameter using the --set key=value[,key=value]
argument to helm install
. For example,
$ helm install --name my-release --set persistence.size=1Ti minio/minio
The above command deploys MinIO server with a 1Ti backing persistent volume.
Alternately, you can provide a YAML file that specifies parameter values while installing the chart. For example,
$ helm install --name my-release -f values.yaml minio/minio
Tip: You can use the default values.yaml
Distributed MinIO
This chart provisions a MinIO server in standalone mode, by default. To provision MinIO server in distributed mode, set the mode
field to distributed
,
$ helm install --set mode=distributed minio/minio
This provisions MinIO server in distributed mode with 4 nodes. To change the number of nodes in your distributed MinIO server, set the replicas
field,
$ helm install --set mode=distributed,replicas=8 minio/minio
This provisions MinIO server in distributed mode with 8 nodes. Note that the replicas
value should be a minimum value of 4, there is no limit on number of servers you can run.
You can also expand an existing deployment by adding new zones, following command will create a total of 16 nodes with each zone running 8 nodes.
$ helm install --set mode=distributed,replicas=8,zones=2 minio/minio
StatefulSet limitations applicable to distributed MinIO
- StatefulSets need persistent storage, so the
persistence.enabled
flag is ignored whenmode
is set todistributed
. - When uninstalling a distributed MinIO release, you'll need to manually delete volumes associated with the StatefulSet.
Persistence
This chart provisions a PersistentVolumeClaim and mounts corresponding persistent volume to default location /export
. You'll need physical storage available in the Kubernetes cluster for this to work. If you'd rather use emptyDir
, disable PersistentVolumeClaim by:
$ helm install --set persistence.enabled=false minio/minio
"An emptyDir volume is first created when a Pod is assigned to a Node, and exists as long as that Pod is running on that node. When a Pod is removed from a node for any reason, the data in the emptyDir is deleted forever."
Existing PersistentVolumeClaim
If a Persistent Volume Claim already exists, specify it during installation.
- Create the PersistentVolume
- Create the PersistentVolumeClaim
- Install the chart
$ helm install --set persistence.existingClaim=PVC_NAME minio/minio
Configure TLS
To enable TLS for MinIO containers, acquire TLS certificates from a CA or create self-signed certificates. While creating / acquiring certificates ensure the corresponding domain names are set as per the standard DNS naming conventions in a Kubernetes StatefulSet (for a distributed MinIO setup). Then create a secret using
$ kubectl create secret generic tls-ssl-minio --from-file=path/to/private.key --from-file=path/to/public.crt
Then install the chart, specifying that you want to use the TLS secret:
$ helm install --set tls.enabled=true,tls.certSecret=tls-ssl-minio minio/minio
Pass environment variables to MinIO containers
To pass environment variables to MinIO containers when deploying via Helm chart, use the below command line format
$ helm install --set environment.MINIO_BROWSER=on,environment.MINIO_DOMAIN=domain-name minio/minio
You can add as many environment variables as required, using the above format. Just add environment.<VARIABLE_NAME>=<value>
under set
flag.