# Using metricbeat in a CRC Instalation of Openshift

**URL:** https://discuss.elastic.co/t/using-metricbeat-in-a-crc-instalation-of-openshift/326346
**Category:** Beats
**Tags:** metricbeat
**Created:** [February 23, 2023, 4:11pm UTC](https://discuss.elastic.co/t/using-metricbeat-in-a-crc-instalation-of-openshift/326346 "2023-02-23T16:11:15Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ElasticLiver](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticliver/32/64869_2.png) [@ElasticLiver](https://discuss.elastic.co/u/ElasticLiver)
#### Post date: [February 23, 2023, 4:11pm UTC](https://discuss.elastic.co/t/using-metricbeat-in-a-crc-instalation-of-openshift/326346/1 "2023-02-23T16:11:15Z")

</div>

Hi Im having problems with the instalation of metricbeat using the manifest in the documentation

[https://raw.githubusercontent.com/elastic/beats/7.17/deploy/kubernetes/metricbeat-kubernetes.yaml](https://raw.githubusercontent.com/elastic/beats/7.17/deploy/kubernetes/metricbeat-kubernetes.yaml)

this path doesnt exist on the server:

```
  bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token

```

and also where I can obtain a cert to use in this line?

```
      ssl.certificate_authorities:
    - /path/to/kubelet-service-ca.crt

```

---

<div class="post-metadata">

### Author: ![Tetiana\_Kravchenko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tetiana_kravchenko/32/102683_2.png) [@Tetiana\_Kravchenko](https://discuss.elastic.co/u/Tetiana_Kravchenko)
#### Post date: [February 27, 2023, 3:22pm UTC](https://discuss.elastic.co/t/using-metricbeat-in-a-crc-instalation-of-openshift/326346/2 "2023-02-27T15:22:56Z")

</div>

Hi @ElasticLiver

> this path doesnt exist on the server:
> 
> ```auto
> bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
> 
> ```

This file should be available inside the metricbeat container, together with `/var/run/secrets/kubernetes.io/serviceaccount/ca.crt`, more details on it - [here](https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/#directly-accessing-the-rest-api).

> and also where I can obtain a cert to use in this line?
> 
> ```auto
> ssl.certificate_authorities:
> - /path/to/kubelet-service-ca.crt
> 
> ```

it depends on your setup, did you check if you have a configmap in `openshift-kube-apiserver` namespace with `ca-bundle.crt` data as described [here](https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-kubernetes.html#_red_hat_openshift_configuration)?

---

<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: [March 27, 2023, 5:23pm UTC](https://discuss.elastic.co/t/using-metricbeat-in-a-crc-instalation-of-openshift/326346/3 "2023-03-27T17:23:36Z")

</div>

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