kubernetes-elasticsearch-cluster
kubernetes-elasticsearch-cluster copied to clipboard
Kubernetes cluster restart
This es cluster deployment on Kubernetes uses statefulsets and persistent volumes. What happend if the Kubernetes cluster is broken and needs to be shutdown? Does the Elasticsearch deployment find their corresponding persistent volumes after a cluster restart?
For as long as it's the same cluster, and data isn't corrupted, I believe so.
Thats a promise of Kubernetes Statefulsets. Each replica in a Statefulset gets a unique and durable hostname and Persistent Volume. As long as your etcd cluster is not corrupted, your Kubernetes Cluster should boot up and recreate the state of the pods before the Kubernetes shutdown. If your etcd cluster data get corrupted, there is no such guarantee.
I've looked at exporting elasticsearch snapshots to google buckets, but these aren't 100% reliable (I/O errors cause incomplete backup/restore ~10% of the time) Is there some way to use GCE disk snapshots to make the kubernetes cluster + persistent disks fully restorable?
looks like there's gradual progress toward snaphot/restore for PVCs: https://github.com/kubernetes/website/issues/1691