Please refer to the following documentation Object Lifecycle Management for detailed information. Referring to the MinIO documentation, please follow the below steps to configure the cleanup/lifecycle management policy when the bucket "helixdr-backup" on MinIO is having versioning enabled.
1. Download minio client:
https://min.io/docs/minio/linux/reference/minio-mc.html
2. Create a minio alias:
./mc --config-dir /tmp/.mc --quiet --insecure alias set <aliasname> https://<minio-api-url> admin bmcAdm1n
3. Create a noncurrent version cleanup policy:
./mc --insecure --config-dir /tmp/.mc ilm rule add --noncurrent-expire-days 1 <aliasname>/<bucketname>
The bucket name here is "helixdr-backup"
4. Add a deletion rule:
mc --insecure --config-dir /tmp/.mc ilm rule add --expire-delete-marker <aliasname>/<bucketname>
5. Rollout restart MinIO pods:
kubectl rollout restart sts/minio -n <NS>
Note: It will take a couple of days to release the space from PVC (Persistent Volume Claim). In this case, a large amount of data could also play a role as mentioned in the MinIO documentation:
Please open a support case if any further follow-up queries