Persistence on Kubernetes if using S3 as an object store

Is persistence needed for loki-backend and loki-write if the object_store is using s3 from minio?

Yes to write component, maybe to the backend. Please see my reply on another thread here: Does an HA Loki instance need persistent local storage? - #4 by obiwan.

I see. Why do backend and writer needs their owns pv?

As mentioned in the link to another thread, you need PV for writers because the writers use WAL to prevent data loss (see Write Ahead Log | Grafana Loki documentation). If you don’t have it enabled then you don’t need to worry about it. But it’s a good idea to have it enabled just in case.

Backend needs PV because capacitor keeps a marker file that marks chunks to be deleted. If you don’t have a PV you could lose the file if a compactor container restarts. This is not that big of a deal, if you use another method to do life cycling such as S3 bucket policy.