<p>I have a Kubernetes cluster and do all my deployments in a declarative manner, by executing the &quot;apply&quot; command in CI/CD pipeline.</p>
<p>&quot;Apply&quot; works in such a way that it merges the state of an object with the manifest that came with the command. As the result, you may make manual changes - for example, add a new key-value to a ConfigMap and &quot;apply&quot; will leave it intact, even though this key doesn't exist in source code.</p>
<p>So I wonder, how can I detect such issues? Doing &quot;delete&quot; and &quot;create&quot; is not an option since it disrupts the availability. I don't want to change deployment from &quot;apply&quot; since it's production. I just to find manual modifications in a namespace.</p>

<p><strong><a href="https://github.com/weaveworks/kubediff" rel="nofollow noreferrer">kubediff</a></strong> is what you are looking for.</p>
<p>You can run it as a command-line tool e.g.:</p>
<pre><code>$ ./kubediff k8s
Checking ReplicationController 'kubediff'
 *** .spec.template.spec.containers[0].args[0]: '-repo=https://github.com/weaveworks/kubediff' != '-repo=https://github.com/&lt;your github repo&gt;'
Checking Secret 'kubediff-secret'
Checking Service 'kubediff'
</code></pre>
<p>or as a service inside K8s cluster. This mode also gives you a simple UI showing the output.</p>
