ibm-minio-objectstore
by Helm
Minio is a high performance distributed object storage server
About this chart
Minio
Introduction
Minio is a high-performance distributed Object Storage server, which is designed for large-scale private cloud infrastructure. Minio aggregates persistent volumes (PVs) into scalable distributed Object Storage, by using Amazon S3 REST APIs. You can manage Minio configuration and credentials by using Kubernetes ConfigMaps and Secrets, when Minio is deployed by using a Helm Chart.
Minio supports stand-alone, distributed, and network-attached storage (NAS) Gateway mode. For more information, see Distributed MinIO Quickstart Guide and MinIO NAS Gateway. In distributed mode, you can pool multiple drives (even on different systems) into a single Object Storage server.
Chart Details
The ibm-minio-objectstore chart bootstraps a Minio deployment on a Kubernetes cluster by using the Helm package manager.
Limitations
Prerequisites
- Kubernetes 1.10+ with Beta APIs that are enabled for default stand-alone mode.
- Kubernetes 1.10+ with Beta APIs that are enabled to run Minio in a distributed mode.
- A supported PV provisioner in the underlying infrastructure.
- A Secret object that contains access and secret keys in base64 encoded form. For more information, see Access and secret keys secret section.
- Dynamic volume provisioning by using storage class is required when you use Minio in a distributed mode.
PodSecurityPolicy Requirements
The ibm-minio-objectstore chart requires a pod security policy to be bound to the target namespace before installation.
You can either choose the predefined pod security policy or create your own pod security policy.
- For IBM Cloud Private Version 3.1, the predefined pod security policy name is
ibm-privileged-psp. - for IBM Cloud Private Version 3.1.1, the predefined pod security policy name is
ibm-anyuid-psp.
If you want to create your own pod security policy, use the following definition:
Custom PodSecurityPolicy definition:
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: minio-psp
spec:
allowPrivilegeEscalation: true
allowedCapabilities:
- SETPCAP
- AUDIT_WRITE
- CHOWN
- NET_RAW
- DAC_OVERRIDE
- FOWNER
- FSETID
- KILL
- SETUID
- SETGID
- NET_BIND_SERVICE
- SYS_CHROOT
- SETFCAP
forbiddenSysctls:
- '*'
fsGroup:
rule: RunAsAny
requiredDropCapabilities:
- MKNOD
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- configMap
- emptyDir
- projected
- secret
- downwardAPI
- persistentVolumeClaim
Resources Required
The minio containers have the following resource requests and limits:
| Container | Memory Request | Memory Limit | CPU Request | CPU Limit |
|---|---|---|---|---|
| minio | 256Mi | 512Mi | 250m | 500m |
Installing the Chart
To install by using the Helm command-line interface, add the Helm repository:
# The following command lists the repositories:
helm repo list
# Add the Helm repository:
helm repo add ibm-charts https://raw.githubusercontent.com/IBM/charts/master/repo/stable/
# The following command shows all the charts that are related to the repository:
helm search ibm-charts
# If you do not see the updated chart list, locally update information of available charts from the chart repositories:
helm repo update
Creating access secret
The ibm-minio-objectstore chart uses pre-created Kubernetes secret object that contains the access and secret keys. You need to create the secret and specify the name of secret while you deploy this chart. The secret must contain accesskey (5 - 20 characters) and secretkey (8 - 40 characters) in base64 encoding.
Encode accesskey and secretkey in base64 encoding:
echo -n "admin" | base64
YWRtaW4=
echo -n "admin1234" | base64
YWRtaW4xMjM0
Create the following secret object:
apiVersion: v1
kind: Secret
metadata:
name: minio
namespace: <namespace>
type: Opaque
data:
accesskey: YWRtaW4=
secretkey: YWRtaW4xMjM0
kubectl create -f secrets.yaml
Install the Helm chart by running the following command:
helm install --set minioAccessSecret=<access secret name> ibm-charts/ibm-minio-objectstore --tls
The command deploys a Minio Object Store server on your Kubernetes cluster by using the default configuration. The configuration parameters section lists the parameters that can be configured during installation.
You can also set your preferred name by running the following command:
helm install --name <my-release-name> --set minioAccessSecret=<access secret name> ibm-charts/ibm-minio-objectstore --tls
NOTE: If you configure Minio server with a TLS certificate that you generated, make sure that the common name (CN) that you use is in the following format:
"/CN=*.<my-release-name>-ibm-minio-objectstore.<namespace>.svc.<cluster domain>"
When you install the chart, you must use the same release name that you used to generate the certificate. For more information, see TLS configuration.
Updating Minio configuration by using Helm
Configmap allows injecting containers with configuration data even while a Helm release is being deployed.
To update your Minio server configuration while it is being deployed in a release, complete these tasks:
- Check all the configurable values in the Minio chart by using the
helm inspect values ibm-charts/ibm-minio-objectstorecommand. - Override the
minio_server_configsettings in a YAML formatted file, and then pass that file by using thehelm upgrade -f <YAML-formatted-file-name>.yaml ibm-charts/ibm-minio-objectstorecommand. - Restart the Minio server or servers for the changes to take effect.
You can also check the history of upgrades to a release by using the following command:
helm history <my-release-name>
Uninstalling the chart
To uninstall, delete the Helm release by running the following command:
helm delete --purge <my-release-name> --tls
The command removes all the Kubernetes components that are associated with the chart and deletes the release.
Configuration
The following table lists the configurable parameters and their default values.
| Parameter | Description | Default |
|---|---|---|
arch.amd64 | amd64 scheduling preference | 2 - No preference |
arch.ppc64le | ppc64le scheduling preference | 2 - No preference |
arch.s390x | s390x scheduling preference | 2 - No preference |
image.repository | Image repository | ibmcom/minio |
image.tag | Minio image tag. For possible values, see Tags. | RELEASE.2019-04-09T01-22-30Z.1 |
image.pullPolicy | Image pull policy | IfNotPresent |
mcImage.repository | Client image repository | ibmcom/minio-mc |
mcImage.tag | mc image tag. For possible values, see Tags. | RELEASE.2019-04-03T17-59-57Z.1 |
mcImage.pullPolicy | mc image pull policy | IfNotPresent |
ingress.enabled | Enables ingress | false |
ingress.annotations | Ingress annotations. For example, {kubernetes.io/ingress.class: nginx, kubernetes.io/tls-acme: "true"}. | nil |
ingress.hosts | Host names accepted by ingress. For example, ["chart-example1.local", "chart-example2.local"]. | nil |
ingress.tls | Ingress TLS configuration. For example, [{"secretName": "chart-example-tls", "hosts": ["chart-example.local", "chart-example.local"]}]. | nil |
mode | Minio server mode. Valid options are standalone or distributed. | standalone |
deploymentUpdate.type | Deployment strategy type. Valid options are Recreate or RollingUpdate. | RollingUpdate |
deploymentUpdate.maxUnavailable | Maximum number of pods that can be unavailable during the update process | 1 |
deploymentUpdate.maxSurge | Maximum number of pods that can be created over the wanted number of pods during the update process | 1 |
statefulSetUpdate.updateStrategy | Deployment strategy type. Valid options are OnDelete or RollingUpdate. | RollingUpdate |
replicas | Number of nodes (applicable only to Minio distributed mode). Must be 4 <= x <= 32 | 4 |
minioAccessSecret | Create a secret that contains base64-encoded accesskey (5 - 20 characters) and secretkey (8 - 40 characters). The keys are used to access Minio Object Server. You need to create the secret in the same namespace where you are deploying the chart. | nil |
configPath | Location of the default configuration file | /root/.minio |
configPathmc | Default configuration file location for Minio client (mc) | /root/.mc |
mountPath | Default mount path for the persistent drive | /export |
service.type | Kubernetes service type. Allowed values are NodePort, ClusterIP or LoadBalancer. | ClusterIP |
service.clusterIP | Kubernetes service ClusterIP. Specify whether service type is ClusterIP and whether you want to choose your own Cluster IP. | None |
service.loadBalancerIP | Kubernetes service loadBalancerIP. Specify whether service type is LoadBalancer and whether you want to choose your own Load Balancer IP. | None |
service.port | Kubernetes port on which the service is exposed | 9000 |
service.nodePort | Exposes the service on IP address of the node at a static port when service type is NodePort | 31311 |
service.externalIPs | External IP addresses of the service | nil |
service.prometheusEnable | Enable Prometheus scrape | false |
service.prometheusPath | Metrics path | /minio/prometheus/metrics |
service.prometheusPort | Port for metrics scrapping | 9000 |
persistence.enabled | Use PV to store data | false |
persistence.size | Size of persistent volume claim (PVC) | 10Gi |
persistence.existingClaim | Use an existing PVC to persist data | nil |
persistence.useDynamicProvisioning | If enabled, the PVC will use a storageClassName to bind the volume. | false |
persistence.storageClass | Storage Class to bind PVC. You must specify a valid storage class if you selected useDynamicProvisioning. | None |
persistence.accessMode | ReadWriteOnce or ReadOnly | ReadWriteOnce |
persistence.subPath | Mount a sub directory of the persistent volume, if a sub directory is set. | "" |
priorityClassName | Pod priority settings. IBM Cloud Private system-cluster-critical priority class is available only for kube-system namespace. | "" |
tls.enabled | Enable Minio server with TLS certificates | false |
tls.type | Specify whether a chart must auto-generate a TLS certificate by using cert-manager issuer or use the one that you provide. The valid values are provided and cert-manager-generated. If you are providing the certificate, you must create a secret that contains a private key, TLS certificate, and a certificate authority (CA) certificate. You provide the secret name in the tls.minioTlsSecret parameter. For details, see TLS configuration section. | cert-manager-generated |
tls.minioTlsSecret | Secret that you create and contains a private key (key private.key), TLS certificate (key public.crt), and a CA certificate (key ca.crt) to configure the Minio server with TLS certificates. You must create and specify the secret in the same namespace where you are deploying the chart. | nil |
tls.issuerRef.name | Name of ClusterIssuer or Issuer from which signed x509 certificates is obtained. You must specify this value if you specified the value of tls.type as cert-manager-generated. | icp-ca-issuer |
tls.issuerRef.kind | Kind of certificate authority from which signed x509 certif |
Deploy ibm-minio-objectstore with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-minio-objectstore on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartibm-minio-objectstore is pinned at v2.4.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply