<p>How to flush CoreDNS Cache on kubernetes cluster?</p>

<p>I know it can be done by deleting the CoreDNS pods, but is there a proper way to to the cache flush ?</p>

Fauzan
<p>@coollinuxoid's answer is not suitable for production environment, it will have temporary downtime because the commands will terminate all pods at the same time. Instead, you should use kubernetes deployment's rolling update mechanism by setting an environment variable to avoid the downtime with command:</p>

<pre><code>kubectl -n kube-system set env deployment.apps/coredns FOO="BAR"
</code></pre>
