# Path\_match object name in Dynamic templates

**URL:** https://discuss.elastic.co/t/path-match-object-name-in-dynamic-templates/191512
**Category:** Elasticsearch
**Created:** [July 21, 2019, 11:08am UTC](https://discuss.elastic.co/t/path-match-object-name-in-dynamic-templates/191512 "2019-07-21T11:08:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tomeri](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@tomeri](https://discuss.elastic.co/u/tomeri)
#### Post date: [July 21, 2019, 11:08am UTC](https://discuss.elastic.co/t/path-match-object-name-in-dynamic-templates/191512/1 "2019-07-21T11:08:37Z")

</div>

Hello,

I created the following dynamic template to apply a custom mapping on the "kubernetes" object and it's subobjects and fields:

It should match these:  
kubernetes.container.name  
kubernetes.pod.name  
kubernetes.pod.id  
kubernetes.namespace

```
    {
      "kubernetes_object": {
        "path_match": "kubernetes*",
        "mapping": {
          "dynamic": true
        }
      }
    }

```

The problem is, it also matches fields like

> kuberneteser.container.name

> kubernetesaaaaa.container.name

How can I match **kubernetes.** exactly? I tried various syntaxes but had no luck

---

<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: [August 18, 2019, 11:08am UTC](https://discuss.elastic.co/t/path-match-object-name-in-dynamic-templates/191512/2 "2019-08-18T11:08:39Z")

</div>

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