Deploy Minio on Kubernetes
Kubernetes concepts like Deployments and StatefulSets provide perfect platform to deploy Minio server in standalone, distributed or shared mode. There are multiple options to deploy Minio on Kubernetes, you can choose the one that suits you the most.
You can also explore Kubernetes Minio example to deploy Minio using
If you'd like to get started with Minio on Kubernetes without having to create a real container cluster, you can also deploy Minio locally with MiniKube.
- 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.
- Helm package manager installed on your Kubernetes cluster.
2. Deploy Minio using Helm Chart
Install Minio chart by
$ helm install stable/minio
Above command deploys Minio on the Kubernetes cluster in the default configuration. Below section lists all the configurable parameters of the Minio chart and their default values.
||Minio image name||
||Minio image tag. Possible values listed here.||
||Image pull policy||
||Minio server mode (
||Number of nodes (applicable only for Minio distributed mode). Should be 4 <= x <= 16||
||Default access key||
||Default secret key||
||Default config file location||
||Default mount location for persistent drive||
||Kubernetes service type||
||Kubernetes port where service is exposed||
||Use persistent volume to store data||
||Size of persistent volume claim||
||Type of persistent volume claim||
||ReadWriteOnce or ReadOnly||
||CPU/Memory resource requests/limits||Memory:
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=100Gi \ stable/minio
The above command deploys Minio server with a 100Gi 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 stable/minio
This chart provisions a Minio server in standalone mode, by default. To provision Minio server in distributed mode, set the
mode field to
$ helm install --set mode=distributed stable/minio
This provisions Minio server in distributed mode with 4 nodes. To change the number of nodes in your distributed Minio server, set the
$ helm install --set mode=distributed,numberOfNodes=8 stable/minio
This provisions Minio server in distributed mode with 8 nodes. Note that the
numberOfNodes value should be an integer between 4 and 16 (inclusive).
StatefulSet limitations applicable to distributed Minio
- StatefulSets need persistent storage, so the
persistence.enabledflag is ignored when
modeis set to
- When uninstalling a distributed Minio release, you'll need to manually delete volumes associated with the StatefulSet.
To provision Minio servers in shared mode, set the
mode field to
$ helm install --set mode=shared stable/minio
This provisions 4 Minio server nodes backed by single storage. To change the number of nodes in your shared Minio deployment, set the
$ helm install --set mode=shared,numberOfNodes=8 stable/minio
This provisions Minio server in shared mode with 8 nodes.
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 stable/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."
3. Uninstalling the Chart
Assuming your release is named as
my-release, delete it using the command:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
- An instance of a chart running in a Kubernetes cluster is called a release. Helm automatically assigns a unique release name after installing the chart. You can also set your preferred name by:
$ helm install --name my-release stable/minio
- To override the default keys, pass the access and secret keys as arguments to helm install.
$ helm install --set accessKey=myaccesskey,secretKey=mysecretkey \ stable/minio