Hygor Knust
01/29/2024, 3:26 PMflink-kubernetes-operator on AWS EKS. We’re working with jobs that have significantly large states, ranging from hundreds of GBs to TBs, stored in RocksDB. This requires our TaskManagers to run on instances equipped with dedicated local storage,i4i and r6gd types.
Our challenge comes when mounting these local storage drives into the pods. The flink-kubernetes-operator deploys TaskManagers using Deployments, which means we can’t leverage K8s’ local PersistentVolumes as in StatefulSets. Additionally, emptyDir volumes aren’t a viable option for us because EKS mounts them outside the required drive path.
To work around this, we are using hostPath volumes. However, this led to another issue: Kubernetes doesn’t seem manage the lifecycle of hostPath volumes. As a result, when TaskManagers are relocated, their previous data doesn’t get automatically cleaned up, eventually filling up the disks.
Does anyone know if there is a better way to approach it?Gyula Fóra
01/30/2024, 7:09 AMHygor Knust
01/30/2024, 5:51 PMDeployments , wouldn’t that require the volumes to be ReadWriteMany ? How would that work with Local PVs, where the TMs could be deployed in different nodes, each with their own storages?Gyula Fóra
01/30/2024, 8:40 PMReadWriteOnce . Checkpointing will still copy data to durable storage like S3 / HDFS. This cannot be substituted easily with PVs even if you switch to Statefulsets.Tim Wolfe
01/30/2024, 8:47 PMTim Wolfe
01/30/2024, 8:48 PMHygor Knust
01/30/2024, 8:50 PMlocalDir.
What I’m looking for is alternatives to using the hostPath volume on TaskManagers as it doesn’t seem to be the best approach. emptyDir does not seem work in EKS because it gets mounted out of the NVME drive and there is no option to change it.Hygor Knust
01/30/2024, 8:53 PMhostPath approach, when a TaskManager gets reallocated (for any reason), the state that it used is not cleaned and is left behind. Eventually the disks get filled and the quick solution is to delete the entire instance.
We could try to solve it by using K8s sync hooks and delete the files, but I’m not how safe it is to delete the state files without any sort of synchronization garanteeGyula Fóra
01/30/2024, 8:53 PMReadWriteOnce PV? You woulndt need to clean it up then?Hygor Knust
01/30/2024, 9:01 PMhostPath , where K8s has no information on the volume and no way to relate storage to pods (PVC).Hygor Knust
01/30/2024, 9:01 PMAshvin S
03/07/2024, 10:00 AM