Skip to content

Mirror data between two MinIO cluster using the MinIO client in Kubernetes

License

Notifications You must be signed in to change notification settings

Contargo/k8s-mc-mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mirror MinIO clusters with MinIO client

This simple Kubernetes Deployment sets up a Pod with a MinIO client which can mirror files between two existing MinIO clusters.

Setup

The configuration is based on Secrets for the root users and passwords of the cluster.

  1. In the Namespace of the source MinIO cluster create a Secret called minio-dest-admin containing the root-user and the root-password of the destination MinIO cluster.
  2. If you do not already have a Secret containing the root credentials of the source MinIO cluster, please create one called minio-source-admin containing the keys root-user and root-password with their corresponding values. Otherwise make sure to configure the name of the existing Secret in the minio-client Deployment.
  3. Define the source and destination clusters in the minio-clusters ConfigMap.
  4. Apply the ConfigMap minio-clusters to the Namespace of the source MinIO cluster.
  5. Before you apply the Deployment please consider this: You can run the mc mirror command in line 30 of the minio-client Deployment with --fake instead of --watch to ensure the setup works. See the Pods logs for its output after applying the file to the cluster. If you want to go full force, just change the flag to --watch.
  6. Apply the deployment to the Namespace of the source MinIO cluster to start mirroring.
  7. Delete the deployment to stop mirroring.

About

Mirror data between two MinIO cluster using the MinIO client in Kubernetes

Topics

Resources

License

Stars

Watchers

Forks