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-admin
containing theroot-user
and theroot-password
of 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-admin
containing the keysroot-user
androot-password
with their corresponding values. Otherwise make sure to configure the name of the existing Secret in theminio-client
Deployment. - Define the source and destination clusters in the
minio-clusters
ConfigMap. - Apply the ConfigMap
minio-clusters
to the Namespace of the source MinIO cluster. - Before you apply the Deployment please consider this:
You can run the
mc mirror
command in line 30 of theminio-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
. - Apply the deployment to the Namespace of the source MinIO cluster to start mirroring.
- Delete the deployment to stop mirroring.