# Understading ConfigMap yaml

**URL:** <https://discuss.kubernetes.io/t/understading-configmap-yaml/9604>\
**Category:** General Discussions\
**Created:** [February 6, 2020, 9:02am UTC](https://discuss.kubernetes.io/t/understading-configmap-yaml/9604 "2020-02-06T09:02:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abodilsen](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@abodilsen](https://discuss.kubernetes.io/u/abodilsen)\
**Post date:** [February 6, 2020, 9:02am UTC](https://discuss.kubernetes.io/t/understading-configmap-yaml/9604/1 "2020-02-06T09:02:21Z")

</div>

### Cluster information:

Kubernetes version: v1.14.1  
Cloud being used: bare-metal  
Installation method: manual  
Host OS: Red Hat Enterprise Linux Server release 7.7

Hi,

I have trouble understanding the content of my local-storage.yaml. The below is a snippet of the larger file.

What does hostDir and mountDir mean in this context

```
apiVersion: v1
kind: ConfigMap
metadata:
  name: local-provisioner-config
  namespace: local-storage
data:
  storageClassMap: |
    local-storage:
       hostDir: /mnt/local-storage
       mountDir: /mnt/local-storage
       blockCleanerCommand:
         - "/scripts/shred.sh"
         - "2"
```

---

<div class="post-metadata">

**Author:** ![stephendotcarter](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/stephendotcarter/32/4528_2.png) [@stephendotcarter](https://discuss.kubernetes.io/u/stephendotcarter)\
**Post date:** [February 6, 2020, 10:18am UTC](https://discuss.kubernetes.io/t/understading-configmap-yaml/9604/2 "2020-02-06T10:18:13Z")

</div>

I think this means the `hostDir` directory `/mnt/local-storage` on the worker node will be mounted inside the container in the `mountDir` directory `/mnt/local-storage`.

---

<div class="post-metadata">

**Author:** ![abodilsen](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@abodilsen](https://discuss.kubernetes.io/u/abodilsen)\
**Post date:** [February 6, 2020, 10:28am UTC](https://discuss.kubernetes.io/t/understading-configmap-yaml/9604/3 "2020-02-06T10:28:34Z")

</div>

Hi Stephendotcarter.

Thanks that is also what I thinks. But I would be really happy to get it confirmed. It might be that I have not look well enough but I cant seem to find this stuff well explained in the documentation.

---

<div class="post-metadata">

**Author:** ![stephendotcarter](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/stephendotcarter/32/4528_2.png) [@stephendotcarter](https://discuss.kubernetes.io/u/stephendotcarter)\
**Post date:** [February 6, 2020, 10:55am UTC](https://discuss.kubernetes.io/t/understading-configmap-yaml/9604/4 "2020-02-06T10:55:17Z")

</div>

I think it’s not in K8s documentation because its an out-of-tree plugin.

Definition of the field is here:

- [https://github.com/kubernetes-incubator/external-storage/blob/a0d136736593d7a4741d39d4ef9a9e5c854f24af/local-volume/provisioner/pkg/common/common.go#L112](https://github.com/kubernetes-incubator/external-storage/blob/a0d136736593d7a4741d39d4ef9a9e5c854f24af/local-volume/provisioner/pkg/common/common.go#L112)

This page provides some description of the fields:

- [https://docs.okd.io/latest/install\_config/configuring\_local.html#local-volume-configure-local-provisioner](https://docs.okd.io/latest/install_config/configuring_local.html#local-volume-configure-local-provisioner)
