# Error in heartbeat

**URL:** <https://discuss.elastic.co/t/error-in-heartbeat/359977>\
**Category:** Beats\
**Tags:** docker, heartbeat\
**Created:** [May 22, 2024, 9:34am UTC](https://discuss.elastic.co/t/error-in-heartbeat/359977 "2024-05-22T09:34:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robbyq92](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robbyq92/32/125729_2.png) [@robbyq92](https://discuss.elastic.co/u/robbyq92)\
**Post date:** [May 22, 2024, 9:34am UTC](https://discuss.elastic.co/t/error-in-heartbeat/359977/1 "2024-05-22T09:34:13Z")

</div>

```auto
apiVersion: v1
kind: ConfigMap
metadata:
  name: heartbeat-elk-config
  namespace: heartbeat-elk
data:
  heartbeat.yml: |
    heartbeat.monitors:
    - type: http
      schedule: '@every 30s'
      urls: ["http://example.com"]
      check.response.status: 200
   
    output.elasticsearch:
      hosts: ["http://elasticsearch:9200"]
    setup.kibana:
      host: "http://kibana:5601"
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: heartbeat-elk-deploy
  namespace: heartbeat-elk
spec:
  replicas: 1
  selector:
    matchLabels:
      app: heartbeat
  template:
    metadata:
      labels:
        app: heartbeat
    spec:
      containers:
      - name: heartbeat
        image: miproxy/elastic/heartbeat:8.13.4
        volumeMounts:
        - name: config
          mountPath: /usr/share/heartbeat

      volumes:
      - name: config
        configMap:
          name: heartbeat-elk-config
---
apiVersion: v1
kind: Service
metadata:
  name: heartbeat-elk-service
  namespace: heartbeat-elk
spec:
  selector:
    app: heartbeat
  ports:
  - protocol: TCP
    port: 80
    targetPort: 80

```

I have this deployment for k8s, and the pod start and before y have this error:

```auto
/usr/local/bin/docker-entrypoint: line 8: exec: heartbeat: not found

```

Can help me? what this is the error?  
i saw the docker image [Docker](https://hub.docker.com/layers/elastic/heartbeat/8.13.4/images/sha256-5d07c45ae65d04f63287bedeb8bdb0d3feaac4ce62871c0bfe2d1cfb72af2112?context=explore)

And the image it ok and mount path same.

---

<div class="post-metadata">

**Author:** ![emilioalvap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emilioalvap/32/99310_2.png) [@emilioalvap](https://discuss.elastic.co/u/emilioalvap)\
**Post date:** [May 22, 2024, 3:19pm UTC](https://discuss.elastic.co/t/error-in-heartbeat/359977/2 "2024-05-22T15:19:35Z")

</div>

Hi @robbyq92,

It's likely `volumeMounts.mountPath` is shadowing `/usr/share/heartbeat`, where heartbeat executable is stored. I'd suggest specifying a `subPath` for `heartbeat.yml`, as we do in our k8s template:

```auto
volumeMounts:
        - name: config
          mountPath: /etc/heartbeat.yml
          readOnly: true
          subPath: heartbeat.yml

```

Hope that helps!

---

<div class="post-metadata">

**Author:** ![robbyq92](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robbyq92/32/125729_2.png) [@robbyq92](https://discuss.elastic.co/u/robbyq92)\
**Post date:** [May 23, 2024, 11:42am UTC](https://discuss.elastic.co/t/error-in-heartbeat/359977/3 "2024-05-23T11:42:57Z")

</div>

Thank you, solved.
