krisis / bucket-replication-setup

Minimal set of k8s yaml to setup MinIO object store to test bucket replication, ILM.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

This repo contains the minimal set of k8s artifacts necessary to setup 2 MinIO tenants to test

Prerequisites

Setup

Installing kind

The following command installs a kind based k8s cluster with 4 worker nodes.

kind create cluster --config=kind-simple.yaml --name op-dev

Install MinIO k8s operator

This command installs the MinIO operator. To move to a more recent version of the operator, modify newTag in the kustomization.yaml file.

kustomize build | kubectl apply -f -

Deploy MinIO tenants

(Note: At the time of writing this, the tenants don't have TLS setup.)

  1. Deploy tenant-1
kubectl create -f tenant-1.yaml
  1. Deploy tenant-2
kubectl create -f tenant-2.yaml

Setup bucket replication between tenant-1 and tenant-2

Configuring MinIO tenants

  1. Configuring tenant-2 (destination side)
kubectl run mc-t2 -n tenant-2 --generator=run-pod/v1 --env="MC_HOST_minio=http://minio:minio123@minio/" --rm -i --tty --image minio/mc:RELEASE.2020-05-28T23-43-36Z-157-ga4791cd3 --command -- /bin/sh

Create the destination bucket, say dest

mc mb minio/dest
  1. Configuring tenant-1 (source side)
kubectl run mc-t1 -n tenant-1 --generator=run-pod/v1 --env="MC_HOST_minio=http://minio:minio123@minio/" --rm -i --tty --image minio/mc:RELEASE.2020-05-28T23-43-36Z-157-ga4791cd3 --command -- /bin/sh

Create the source bucket, say source

mc mb minio/source
  1. Configure tenant-1's remote bucket target (From the tenant-1's mc container)
mc admin bucket remote add minio/source http://minio:minio123@minio.tenant-2.svc.cluster.local/dest --service replication"

About

Minimal set of k8s yaml to setup MinIO object store to test bucket replication, ILM.