How to edit the configmap

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

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.