we use k8s HA for our Flink jobs and we store all ...
# troubleshooting
z
we use k8s HA for our Flink jobs and we store all the HA info to s3. Recently we found that there were tons of those old HA stuff sitting in our s3. Is there a way for me to configure the job to automatically prune those?
Copy code
2023-11-21 00:57:45  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphfb80a0cfd69a
2023-11-20 12:07:16  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphfca31fb11062
2023-11-20 08:48:20  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphfd27c59e0692
2023-11-20 10:18:11  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphfd70b9cd1063
2023-11-21 01:25:44  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphfd99ea9b51fe
2023-11-20 18:24:55  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphfd9bed8afa75
2023-11-21 08:19:44  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphfe706709e555
2023-11-20 21:28:41  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphfed6398b55b9
2023-11-20 16:59:34  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphfef536b75eda
2023-11-21 05:44:55  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphff5e160eaa33
2023-11-20 20:22:44  425.3 KiB ha/koko-db-cdc-open-search/submittedJobGraphff63fa87beba
p
I did not found a way to do so. But I skipped because retention price is too low to be a concern
t
To automatically prune old HA data in S3 for your Flink jobs running on Kubernetes, consider using AWS S3 lifecycle policies to set expiration rules for objects in the HA storage path. This approach doesn't require changes to your Flink configuration and ensures old data is cleaned up based on age or other criteria you define.
👍 1
z
Cool. We did end up using the S3 lifecycle policy to clean that up. We actually just had an issue in prod that a job failed to recover from failure because some ha data got cleaned up by the lifecycle policy despite that we have set 14 days as expiration.