<p>I an changed my kubernetes cluster(v1.15.2) configmap, now I want to make my config apply to all of my deployment in some namespace. What is the best practice to do? I am tried to do like this:</p>

<pre><code>kubectl rollout restart deployment soa-report-consumer
</code></pre>

<p>but my cluster has so many deployment, should I write shell script to complete this task, any simple way?</p>

Dolphin
<p><a href="https://kubectl.docs.kubernetes.io/pages/reference/kustomize.html#configmapgenerator" rel="nofollow noreferrer">ConfigMap Generator</a> of kustomize can be used for this.</p>

<p><code>configMapGenerator</code> contains a list of ConfigMaps to generate.
By default, generated ConfigMaps will have a hash appended to the name. The ConfigMap hash is appended after a nameSuffix, if one is specified. Changes to ConfigMap data will cause a ConfigMap with a new name to be generated, triggering a rolling update to Workloads referencing the ConfigMap.</p>

<p><a href="https://github.com/kubernetes-sigs/kustomize/blob/master/examples/configGeneration.md" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/kustomize/blob/master/examples/configGeneration.md</a></p>
