How to create read-only user in elastic

Hi Team, there is a requirment to create read-only user for elastic. I tried my best but could not achieve it. I want to start from scratch. Please give me some suggestion how to achieve this.

Hi @Samantha_V

These documents can help you:

Hi @RabBit_BR

Thanks for the quick response i was not much clear about my requirement earlier.

Here, i am using elk as a container. So, if anyone wants to verify data in elastic, for them i want to create a read-only user. Here, i am trying to create a read-only user for user to access container for verifying the database. Please do help me out.

When asking for help, it is more effective if you describe the steps you've taken and where you got stuck.
Without that we're just guessing and will only be able to give you generic advice.

Hi @TimV
My bad, here what i tried was using some of the curl command which refernced from elastic document to create the user where i failed.
Similar approach i tried for Cassandra, the approach was creating the read-only user when i am trying to deploy cassandra using helm chart. So I am trying to find similar approach for Elastic also, to create a read-only user via values.yaml . I just need some refernces, whether this is achieveable .

Here, we are deploying elastic as a container in rke2 clsuter.

Sorry for inconvience, if my question was not clear.

Please do help me out.