# How to edit the configmap

**URL:** <https://discuss.kubernetes.io/t/how-to-edit-the-configmap/9457>\
**Category:** General Discussions\
**Created:** [January 25, 2020, 6:37am UTC](https://discuss.kubernetes.io/t/how-to-edit-the-configmap/9457 "2020-01-25T06:37:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pyenne](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pyenne](https://discuss.kubernetes.io/u/pyenne)\
**Post date:** [January 25, 2020, 6:37am UTC](https://discuss.kubernetes.io/t/how-to-edit-the-configmap/9457/1 "2020-01-25T06:37:31Z")

</div>

Hi Team,

I have a requirement to update the configmap . How can i achieve this  
kubectl edit configmap configmapname  
Can i update by using above command .  
after that i need to restart the application/pod

How can i restart pod

---

<div class="post-metadata">

**Author:** ![thockin](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/thockin/32/2457_2.png) [@thockin](https://discuss.kubernetes.io/u/thockin)\
**Post date:** [January 25, 2020, 7:43pm UTC](https://discuss.kubernetes.io/t/how-to-edit-the-configmap/9457/2 "2020-01-25T19:43:03Z")

</div>

You can either:

Project the ConfigMap to a file in a volume and have the pod watch it (inotify).

Use ‘kubectl rollout restart’

Make a new deployment with a new configmap and gradually scale it up while the old one is scaled down.

Those are in reverse order wrt safety.
