This simple Kubernetes Deployment sets up a Pod with a MinIO client which can mirror files between two existing MinIO clusters.
The configuration is based on Secrets for the root users and passwords of the cluster.
- In the Namespace of the source MinIO cluster create a Secret called
minio-dest-admincontaining theroot-userand theroot-passwordof the destination MinIO cluster. - If you do not already have a Secret containing the root credentials of the
source MinIO cluster, please create one called
minio-source-admincontaining the keysroot-userandroot-passwordwith their corresponding values. Otherwise make sure to configure the name of the existing Secret in theminio-clientDeployment. - Define the source and destination clusters in the
minio-clustersConfigMap. - Apply the ConfigMap
minio-clustersto the Namespace of the source MinIO cluster. - Before you apply the Deployment please consider this:
You can run the
mc mirrorcommand in line 30 of theminio-clientDeployment with--fakeinstead of--watchto 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. - Apply the deployment to the Namespace of the source MinIO cluster to start mirroring.
- Delete the deployment to stop mirroring.