Skip to content

Instantly share code, notes, and snippets.

@taking
Created January 25, 2023 03:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taking/d5bcf78577822626ea3dd0e3846abbbd to your computer and use it in GitHub Desktop.
Save taking/d5bcf78577822626ea3dd0e3846abbbd to your computer and use it in GitHub Desktop.

Minio Installation with Helm

Prerequisites

helm update

helm repo add minio-official https://charts.min.io
helm repo update minio-official
cat <<EOF > minio-values.yaml
mode: standalone
rootUser: taking
rootPassword: taking1234
replicas: 2
persistence:
  enabled: true
  #storageClass: ""
  size: 10Gi
users:
  - accessKey: taking-access-key
    secretKey: taking-access-key123
    policy: consoleAdmin
resources:
  requests:
    memory: 4Gi
EOF

Install

helm install my-minio minio-official/minio \
    --create-namespace \
    --namespace minio-system \
    -f minio-values.yaml

How-to

MinIO can be accessed via port 9000 on the following DNS name from within your cluster:
my-minio.minio-system.svc.cluster.local

To access MinIO from localhost, run the below commands:

  1. export POD_NAME=$(kubectl get pods --namespace minio-system -l "release=my-minio" -o jsonpath="{.items[0].metadata.name}")

  2. kubectl port-forward $POD_NAME 9000 --namespace minio-system

Read more about port forwarding here: http://kubernetes.io/docs/user-guide/kubectl/kubectl_port-forward/

You can now access MinIO server on http://localhost:9000. Follow the below steps to connect to MinIO server with mc client:

  1. Download the MinIO mc client - https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart

  2. export MC_HOST_my-minio-local=http://$(kubectl get secret --namespace minio-system my-minio -o jsonpath="{.data.rootUser}" | base64 --decode):$(kubectl get secret --namespace minio-system my-minio -o jsonpath="{.data.rootPassword}" | base64 --decode)@localhost:9000

  3. mc ls my-minio-local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment