<p>I have aws-eks cluster and below is my command to replace existing the configuration.</p>
<pre><code>kubectl create configmap flink-config --from-file=./config -o yaml --dry-run | kubectl replace -
</code></pre>
<p>but when I run this command. it gives an error like</p>
<pre><code>W1009 17:00:14.998329  323115 helpers.go:553] --dry-run is deprecated and can be replaced with --dry-run=client.
</code></pre>
<p>Will it do the same thing If I replace -dry-run to -dry-run=client?</p>

NIrav Modi
<p>About <code>dry-run=client</code> we learn</p>
<blockquote>
<p><code>--dry-run=client</code> flag to preview the object that would be sent to
your cluster, without really submitting it.</p>
</blockquote>
<p>And in the kubernetes API reference we read:</p>
<blockquote>
<p>Must be &quot;none&quot;, &quot;server&quot;, or &quot;client&quot;. If client strategy, only print
the object that would be sent, without sending it. If server strategy,
submit server-side request without persisting the resource.</p>
</blockquote>
<p>Performing local tests I realized that when I try to replace an existing config object using <code>dry-run=server</code>, the following error occurs. The apiserver told us that already exist a configmap with the name <code>flink-config</code>.</p>
<pre><code>kubectl create configmap flink-config --from-file=./config -o yaml --dry-run=server
Error from server (AlreadyExists): configmaps &quot;flink-config&quot; already exists
</code></pre>
<p>However is I try with to use <code>dry-run=client</code> the object is not validated by the apiserver, that is, just by the client, so the yaml is printed to us:</p>
<pre><code>kubectl create configmap flink-config --from-file=./config -o yaml --dry-run=client
apiVersion: v1
data:
  config: |
    FOO: foo
    MYVAR: hello
kind: ConfigMap
metadata:
  creationTimestamp: null
  name: flink-config
</code></pre>
<p>So basically, yes, the <code>dry-run=client</code> it has the same effect than the deprecated <code>dry-run</code>. The equivalent flag for <code>dry-run=server</code> was <code>--server-dry-run</code> and became deprecated in v1.18.</p>
