ibm-minio-objectstore

by Helm

Helm chartv2.4.7App RELEASE.2019-04-09T01-22-30Z.1Apache-2.0

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:

ContainerMemory RequestMemory LimitCPU RequestCPU Limit
minio256Mi512Mi250m500m

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:

  1. Check all the configurable values in the Minio chart by using the helm inspect values ibm-charts/ibm-minio-objectstore command.
  2. Override the minio_server_config settings in a YAML formatted file, and then pass that file by using the helm upgrade -f <YAML-formatted-file-name>.yaml ibm-charts/ibm-minio-objectstore command.
  3. 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.

ParameterDescriptionDefault
arch.amd64amd64 scheduling preference2 - No preference
arch.ppc64leppc64le scheduling preference2 - No preference
arch.s390xs390x scheduling preference2 - No preference
image.repositoryImage repositoryibmcom/minio
image.tagMinio image tag. For possible values, see Tags.RELEASE.2019-04-09T01-22-30Z.1
image.pullPolicyImage pull policyIfNotPresent
mcImage.repositoryClient image repositoryibmcom/minio-mc
mcImage.tagmc image tag. For possible values, see Tags.RELEASE.2019-04-03T17-59-57Z.1
mcImage.pullPolicymc image pull policyIfNotPresent
ingress.enabledEnables ingressfalse
ingress.annotationsIngress annotations. For example, {kubernetes.io/ingress.class: nginx, kubernetes.io/tls-acme: "true"}.nil
ingress.hostsHost names accepted by ingress. For example, ["chart-example1.local", "chart-example2.local"].nil
ingress.tlsIngress TLS configuration. For example, [{"secretName": "chart-example-tls", "hosts": ["chart-example.local", "chart-example.local"]}].nil
modeMinio server mode. Valid options are standalone or distributed.standalone
deploymentUpdate.typeDeployment strategy type. Valid options are Recreate or RollingUpdate.RollingUpdate
deploymentUpdate.maxUnavailableMaximum number of pods that can be unavailable during the update process1
deploymentUpdate.maxSurgeMaximum number of pods that can be created over the wanted number of pods during the update process1
statefulSetUpdate.updateStrategyDeployment strategy type. Valid options are OnDelete or RollingUpdate.RollingUpdate
replicasNumber of nodes (applicable only to Minio distributed mode). Must be 4 <= x <= 324
minioAccessSecretCreate 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
configPathLocation of the default configuration file/root/.minio
configPathmcDefault configuration file location for Minio client (mc)/root/.mc
mountPathDefault mount path for the persistent drive/export
service.typeKubernetes service type. Allowed values are NodePort, ClusterIP or LoadBalancer.ClusterIP
service.clusterIPKubernetes service ClusterIP. Specify whether service type is ClusterIP and whether you want to choose your own Cluster IP.None
service.loadBalancerIPKubernetes service loadBalancerIP. Specify whether service type is LoadBalancer and whether you want to choose your own Load Balancer IP.None
service.portKubernetes port on which the service is exposed9000
service.nodePortExposes the service on IP address of the node at a static port when service type is NodePort31311
service.externalIPsExternal IP addresses of the servicenil
service.prometheusEnableEnable Prometheus scrapefalse
service.prometheusPathMetrics path/minio/prometheus/metrics
service.prometheusPortPort for metrics scrapping9000
persistence.enabledUse PV to store datafalse
persistence.sizeSize of persistent volume claim (PVC)10Gi
persistence.existingClaimUse an existing PVC to persist datanil
persistence.useDynamicProvisioningIf enabled, the PVC will use a storageClassName to bind the volume.false
persistence.storageClassStorage Class to bind PVC. You must specify a valid storage class if you selected useDynamicProvisioning.None
persistence.accessModeReadWriteOnce or ReadOnlyReadWriteOnce
persistence.subPathMount a sub directory of the persistent volume, if a sub directory is set.""
priorityClassNamePod priority settings. IBM Cloud Private system-cluster-critical priority class is available only for kube-system namespace.""
tls.enabledEnable Minio server with TLS certificatesfalse
tls.typeSpecify 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.minioTlsSecretSecret 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.nameName 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.kindKind 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartibm-minio-objectstore is pinned at v2.4.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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