By Logstash I believe you mean an ELK cluster. Logstash is just a log forwarder and not an endpoint for storage.
Not really. It's not possible with a GCEPersistentDisk
. This is more of GCE limitation where you can only mount a volume on an instance at a time.
Also, as you can see in the docs supports the ReadWriteOnce
and the ReadOnlyMany
but not at the same time.
Important! A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time.
You could achieve this but just using a single volume on a single K8s node and then partition your volume to be used by different Elasticsearch pods on the same node but this would defeat the purpose of having a distributed cluster.
Elasticsearch works fine if you have your nodes in different Kubernetes nodes and each of them has a separate volume.