<p>According to the <a href="https://kubernetes.github.io/ingress-nginx/deploy/#aws" rel="nofollow noreferrer">ingress nginx controller doc</a>, it remind the object will use the ingress-nginx namespace, and can change to other namespace with <code>--watch-namespace</code> tag. </p>

<p>But when I using </p>

<pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx0.28.0/deploy/static/provider/aws/service-l7.yaml --watch-namespace=default
</code></pre>

<p>It report </p>

<pre><code>Error: unknown flag: --watch-namespace
See 'kubectl apply --help' for usage.
</code></pre>

ccd
<p>You are messing up with one flag with others. By default following command will deploy the controller in <code>ingress-nginx</code> namespace. But you want it to be in some other namespace like <code>default</code>. To do so, you need to pass <code>kubectl</code>'s flag like <code>-n</code> or <code>--namespace</code>. </p>

<pre class="lang-sh prettyprint-override"><code>$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx0.28.0/deploy/static/provider/aws/service-l7.yaml --namespace default
</code></pre>

<p>NB:</p>

<p><code>--watch-namespace</code> is a flag of <code>nginx-ingress-controller</code>. It is used while running the binary inside the container. It needs to be set from <code>deployment.spec.contianers[].args[]</code>. It is used to bind the controller's watch in a single  k8s namespace(by default it watches objects of all namespaces). </p>
