# Loading configmap in k8s has error "exec metricbeat no found"

**URL:** <https://discuss.elastic.co/t/loading-configmap-in-k8s-has-error-exec-metricbeat-no-found/99434>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [September 5, 2017, 1:28pm UTC](https://discuss.elastic.co/t/loading-configmap-in-k8s-has-error-exec-metricbeat-no-found/99434 "2017-09-05T13:28:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yveseirean](https://avatars.discourse-cdn.com/v4/letter/y/f17d59/32.png) [@Yveseirean](https://discuss.elastic.co/u/Yveseirean)\
**Post date:** [September 5, 2017, 1:28pm UTC](https://discuss.elastic.co/t/loading-configmap-in-k8s-has-error-exec-metricbeat-no-found/99434/1 "2017-09-05T13:28:55Z")

</div>

I deployed the metricbeat docker on kubernetes, the metricbeat.yml is in configmap. When the pod starts, came across an CrashLoopBackOff error:  
**"/usr/local/bin/docker-entrypoint: line 8: exec: metricbeat: not found"**

the yml doesn't matter here as the error appeared with an empty configmap. Certainly, no configmap, no error appeared.

I guess the error is there as docker entrypoint run the metricbeat command to init? However, the error wasnt seen in docker running, weird!

Can anyone know if the metricbeat command running when container starting, please?

# My deployment definition:

 ![metricbeat](https://us1.discourse-cdn.com/elastic/original/3X/b/1/b1930460c7aa45ae19244931dc117cc8b7da9049.JPG)

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [September 5, 2017, 1:55pm UTC](https://discuss.elastic.co/t/loading-configmap-in-k8s-has-error-exec-metricbeat-no-found/99434/2 "2017-09-05T13:55:21Z")

</div>

Hi @Yveseirean,

I think you are overriding Metricbeat binary path (`/usr/share/metricbeat`) with your own volume 🙂 I guess you are trying to chagne default `metricbeat.yml`? Could you explain your use case?

You may want to use `--path.config` to override default config folder, and put your metricbeat.yml there.

---

<div class="post-metadata">

**Author:** ![Yveseirean](https://avatars.discourse-cdn.com/v4/letter/y/f17d59/32.png) [@Yveseirean](https://discuss.elastic.co/u/Yveseirean)\
**Post date:** [September 5, 2017, 4:09pm UTC](https://discuss.elastic.co/t/loading-configmap-in-k8s-has-error-exec-metricbeat-no-found/99434/3 "2017-09-05T16:09:40Z")

</div>

Thanks @exekias

Yes, I thought the configmap able to overwrite the default metricbeat.yml, but it cannot

After specify the customer folder, have to clarify the value of _setup.template.fields: "fields.yml"_ if it keeps by default

Thank you again!

one thing:  
If add loading dashboard into configmap, the pod could fail as  
Exiting: Error importing Kibana dashboards: fail to import the dashboards in Elasticsearch: Error importing directory /usr/share/metricbeat/kibana: Failed to import dashboard: Failed to load directory /usr/share/metricbeat/kibana/5.x/dashboard:  
error loading /usr/share/metricbeat/kibana/5.x/dashboard/Metricbeat-Rabbitmq.json: open /usr/share/metricbeat/kibana/5.x/visualization/RabbitMQ-Memory-Usage.json: no such file or directory

So have to manually run this cli to avoid the pod clashed

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [September 6, 2017, 11:09am UTC](https://discuss.elastic.co/t/loading-configmap-in-k8s-has-error-exec-metricbeat-no-found/99434/4 "2017-09-06T11:09:57Z")

</div>

> [@Yveseirean](#):
>
> After specify the customer folder, have to clarify the value of setup.template.fields: “fields.yml” if it keeps by default

You should point that one to the original fields (under `/usr/share/metricbeat/fields.yml`), as it contains all field mapping definitions that will be pushed to Elasticsearch for event mapping.

Thanks for the Dashboards report, we are looking into it

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 4, 2017, 11:10am UTC](https://discuss.elastic.co/t/loading-configmap-in-k8s-has-error-exec-metricbeat-no-found/99434/5 "2017-10-04T11:10:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
