<p>We have multiple microservices and a couple of them use some external APIs. Certificates to connect to those external ones from our services are periodically rotated. How can we update our services to use the new public certs of external APIs without much disruption and much outage at our end. We use kubernetes and docker images.</p>

summer
<p>You can use the <a href="https://kubernetes.io/docs/concepts/configuration/configmap/" rel="nofollow noreferrer">configmap</a> to store your certificate and mount it to your deployment.</p>
<p>Configmap will get auto-updated inside the Running POD without restarting the POD. So you have to just mount the config map once and changes will be autp updated to all available replicas of deployment without any restart and disruption.</p>
<p>Read my article : <a href="https://faun.pub/update-configmap-without-restarting-pod-56801dce3388" rel="nofollow noreferrer">Update configmap without restarting POD</a></p>
<p>Store you cert in configmap and mount it to POD</p>
<p><strong>Example</strong> :</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: test-config
data:
  cert: &lt;data&gt;
</code></pre>
<p><strong>Note</strong> : People consider configmap as insecure option to store secure data, if someone has your cluster access they can watch or view your certificates. If that's not issue in your case it is made for storing configuration only so will work like charm.</p>
