Report this

What is the reason for this report?

Setting access rights on Kubernetes volume for Elasticsearch

Posted on February 21, 2019

I’m working on deploying Elasticsearch to a DO Kubernetes cluster. To persist the data I’ve created a PersitentVolumeClaim that I have made available to the pod running Elasticsearch. Problem is that Elasticsearch fails to start with a Access Denied error on the data mount.

Elasticsearch does not run as root. Instead it runs as user and group 1000. So for it to have access to the data volume the user 1000 has to be given access rights on the volume.

PeristentVolumes have an annotation pv.beta.kubernetes.io/gid: "1000" that can normally be used. However with the DO implementation of Kubernetes only a PVC is created and not a PersistentVolume and a PVC.

How to proceed and give the user 1000 read-write access to the PVC?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.