Elasticsearch pods are crashing due to permission denied error

Solution Verified - Updated -

Issue

  • Elasticsearch pods are crashing:
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
  • Below logs are streamed in elasticsearch pods:
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 Conatiner Platform (RHOCP)
    • 4.9
  • Red Hat OpenShift Logging
    • 5.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