minio / operator

Simple Kubernetes Operator for MinIO clusters :computer:
https://min.io/docs/minio/kubernetes/upstream/index.html
GNU Affero General Public License v3.0
1.22k stars 455 forks source link

use console create a tenant then pool-X(sts) pods is CrashLoopBackOff #2209

Open durant0819 opened 4 months ago

durant0819 commented 4 months ago

Dear, I met a problem and I may also know the root cause, but I couldn't solve it , so I need your help.

Current Behavior

Now the condition was like: image

I found the log from console like: image

I judged when the minio start, the cmd is wrong then lead to this problem. according to the rules, the minio cmd should be like ---> minio server \<flags> {DIRS...} but the field 'agrs' of sts and pod didn't contains {DIRS} --- > minio server \<flags> (picture below) image

so I tried to modify the sts but it seems like: the sts was under controlled by Tenant, I could not modify the args, I also checked the volumemounts, I could find the /export: image

So How can I pass the /exportX to the args like: minio server \<flags> /export0 /export1 ... or there is another way which I don't know how to use the operator, thank you for your great support.

ramondeklein commented 4 months ago

@durant0819 The MinIO container is using a configuration file that can be found in /tmp/minio/config.env. It is generated by the sidecar container and it will contain the servers. In your configuration it should look something like this:

export MINIO_BROWSER="on"
export MINIO_ROOT_USER="..."
export MINIO_ROOT_PASSWORD="..."
export MINIO_STORAGE_CLASS_STANDARD="EC:..."
export MINIO_ARGS="https://minio4harbor-pool-0-{0...3}.minio-rdk-hl.minio-rdk.svc.cluster.local/export{0...3}"

When MINIO_ARGS is set, then you don't need to specify the servers/directories anymore. So this won't be the problem that prevents the server from starting.

Please check the logs using kubectl -n <namespace> logs <pod-name>. MinIO will log why it cannot start.