<p><a href="https://i.stack.imgur.com/4MX4U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4MX4U.png" alt="enter image description here" /></a><a href="https://stackoverflow.com/questions/64481963/unknown-flag-export-while-copying-secret-from-one-namespace-to-another-kubect">unknown flag: --export while copying secret from one namespace to another kubectl</a></p>
<p>I solved my problem with the above solution but i dont know why i got this error.</p>
<p>Above answers says on kubernetes 1.14 export option deprecated and on 1.18 it has been remove but i use 1.16.</p>
<p>Secondly on GCP my cluster started to give warning at the same time.</p>
<p>Why i get this error while i should not? Am i looking wrong direction?</p>
<p><a href="https://i.stack.imgur.com/CRe8Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CRe8Q.png" alt="enter image description here" /></a></p>

rmznbyk 1
<p>As of Kubernetes 1.14, --export is deprecated and this feature is removed in 1.18. You can use get -o yaml without --export. For example, the following command export secrets config:</p>
<pre><code>kubectl get secret &lt;your secrets&gt; --namespace &lt;your namespace&gt; -o yaml &gt; output.yaml
</code></pre>
