<p>I am having running elastic-search on my Kubernetes cluster with host <code>http://192.168.18.35:31200/</code>. Now I have to connect my elastic search to the kibana. For that an enrollment token needs to be generated but how?
When I login to the root directory of elastic-search from kibana dashboard and type the following command to generate a new enrollment token, it shows the error:</p>
<p><a href="https://i.stack.imgur.com/h5B95.png" rel="noreferrer"><img src="https://i.stack.imgur.com/h5B95.png" alt="enter image description here" /></a></p>
<pre><code>command : bin/elasticsearch-create-enrollment-token --scope kibana
error: bash: bin/elasticsearch-create-enrollment-token: No such file or directory
</code></pre>
<p>I have created a file elasticsearch-create-enrollment-token inside the bin directory and gave full permission. Still, no tokens are generated.
Have any ideas on enrollment token guys?</p>

ashique
<p>Assuming that you are on debian/ ubuntu, this should help</p>
<pre><code>cd /usr/share/elasticsearch/bin/

then

./elasticsearch-create-enrollment-token --scope kibana
</code></pre>
