# If not a root account, the kubernetes metadata is not generated

**URL:** <https://discuss.elastic.co/t/if-not-a-root-account-the-kubernetes-metadata-is-not-generated/248786>\
**Category:** Beats\
**Tags:** auditbeat\
**Created:** [September 16, 2020, 8:08am UTC](https://discuss.elastic.co/t/if-not-a-root-account-the-kubernetes-metadata-is-not-generated/248786 "2020-09-16T08:08:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyungseok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kyungseok/32/62519_2.png) [@kyungseok](https://discuss.elastic.co/u/kyungseok)\
**Post date:** [September 16, 2020, 8:08am UTC](https://discuss.elastic.co/t/if-not-a-root-account-the-kubernetes-metadata-is-not-generated/248786/1 "2020-09-16T08:08:01Z")

</div>

Hello,  
I am trying to run auditbeat on kubernetes cluster  
But kubernetes metadata are not added to events when I run application with not a root account

Below is a debug messages

> 2020-09-16T04:59:16.435Z DEBUG [add\_process\_metadata] add\_process\_metadata/add\_process\_metadata.go:195 failed to get process metadata for PID=11776: readlink /proc/11776/exe: permission denied {"instance\_id": 1}
> 
> 2020-09-16T04:59:16.435Z DEBUG [processors] processing/processors.go:112 Fail to apply processor global{add\_host\_metadata=[netinfo.enabled=[true], cache.ttl=[5m0s]], add\_process\_metadata=[match\_pids=[system.process.pid process.ppid process.parent.pid process.parent.ppid], mappings={"container.id":"container.id"}, ignore\_missing=false, overwrite\_fields=true, restricted\_fields=true, host\_path=/, cgroup\_prefixes=[/kubepods /docker]], add\_kubernetes\_metadata}: process not found

It seems that the approach to the /proc/\* path is only possible root account.  
Is there any way to check k8s metadata with an account other than the root?

Thanks

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [September 16, 2020, 10:04am UTC](https://discuss.elastic.co/t/if-not-a-root-account-the-kubernetes-metadata-is-not-generated/248786/2 "2020-09-16T10:04:24Z")

</div>

You need to dive deeper into cgroups, namespaces and general system permissions. It's not an issue with Beats.

---

<div class="post-metadata">

**Author:** ![kyungseok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kyungseok/32/62519_2.png) [@kyungseok](https://discuss.elastic.co/u/kyungseok)\
**Post date:** [September 17, 2020, 5:29am UTC](https://discuss.elastic.co/t/if-not-a-root-account-the-kubernetes-metadata-is-not-generated/248786/3 "2020-09-17T05:29:48Z")

</div>

Yes, thank you for your reply.

There is no access to the /proc/\* path through the non-root account  
so non-root account don't use the **add\_process\_metadata** function.

Is there any way to solve this?

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [September 17, 2020, 7:38am UTC](https://discuss.elastic.co/t/if-not-a-root-account-the-kubernetes-metadata-is-not-generated/248786/4 "2020-09-17T07:38:01Z")

</div>

As I said this is not an issue with Beats, it's just system configuration. Please reach out to your cluster administrator.

---

<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 15, 2020, 9:38am UTC](https://discuss.elastic.co/t/if-not-a-root-account-the-kubernetes-metadata-is-not-generated/248786/5 "2020-10-15T09:38:03Z")

</div>

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