Elasticsearch pods are stuck in CrashLoopBackOff due permission denied error

Solution Verified - Updated -

Issue

  • Elasticsearch pods failed to start:
elasticsearch-cdm-xxxxxxxxx-1-xxxxxxxxxx-xxxxxx      1/2        CrashLoopBackOff            19                75m
elasticsearch-cdm-xxxxxxxxx-2-xxxxxxxxxx-xxxxxx      1/2        CrashLoopBackOff            19               75m
elasticsearch-cdm-xxxxxxxxx-3-xxxxxxxxxx-xxxxxx      1/2        CrashLoopBackOff            19               74m
  • Elasticsearch pod is reporting below errors:
cp: cannot create regular file '/etc/elasticsearch/elasticsearch.yml': Permission denied
cp: cannot create regular file '/etc/elasticsearch/log4j2.properties': Permission denied

Environment

  • Red Hat OpenShift Container Platform (RHOCP)

    • 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content