For the RocksDB pod, hostpath should work. Hostpath volumes are not automatically cleaned up, so it should be able to work for your use case. Note that you will need to specifically use a node selector in your pods if you want to access that particular DB instance. If you want a more scalable solution, there is a new alpha local storage PV feature, where you can expose each SSD as a PV, and you no longer need to manually schedule your pods to specific nodes. https://github.com/kubernetes-incubator/external-storage/tree/master/local-volume
I'm not familiar with RocksDB, is it accessible over the network, or only locally? If only locally, then your app pods will also need to use the same hostpath or local PV mechanism. On Fri, Jun 30, 2017 at 9:26 AM, <thst...@gmail.com> wrote: > I have the following setup: > > One node with > 1) Golang app using read only RocksDB. > 2) Docker image with RocksDB mounted to host node’s filesystem > Need to create at least two Pods using same RocksDB (it is big and needs > to be just one copy). > Also later I need to create one more node with exactly the same > configuration. The two nodes to be load balanced. > > The node's disk is SSD and I want the RocksDB data to be stored locally > on the same node. > For RocksDB data storage I am exploring hostPath. From the documentation: > "A hostPath volume mounts a file or directory from the host node’s > filesystem into your pod." > Host-based storage is similar to Docker volumes, where a portion of the > host’s storage becomes available to the pod. > > What concerns me is the following: > Once a pod is terminated, the volume gets automatically deleted. > > Because it is a database I need to remain on the node's filesystem. > > How to solve those challenges with Kubernetes? > > -- > You received this message because you are subscribed to the Google Groups > "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-users+unsubscr...@googlegroups.com. > To post to this group, send email to kubernetes-users@googlegroups.com. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.