<p>Currently I'm using microk8s to run local cluster.
<br />
When I run <code>k get pods -A</code>, this result shown</p>
<pre><code>...
kube-system   kubernetes-dashboard-7ffd448895-56tlr        1/1     Running   1          3d14h
...
</code></pre>
<p>Ok.. It means there's a pod kubernetes-dashboard running in kube-system namespace.
<br />
And I tried to port forward that pod 443 into 10443 and this result shows up</p>
<pre><code>$ k port-forward kubernetes-dashboard-7ffd448895-56tlr 10443:443
Error from server (NotFound): pods &quot;kubernetes-dashboard-7ffd448895-56tlr&quot; not found
</code></pre>
<p>I mean, there it is. The pod is there. But it keeps denying it.
<br />
I don't understand this result and stuck with no progress. <br />
How can I port-forward my pods?</p>

<p>The result of <code>k get pods -A</code> indicates that the pod is in the namespace <code>kube-system</code>. Unless a resource is in the default namespace, you must specify the namespace:</p>
<pre><code>k port-forward -n kube-system kubernetes-dashboard-7ffd448895-56tlr 10443:443
</code></pre>
<p>Alternatively, you can update your context to use a different namespace by default:</p>
<pre><code>kubectl config set-context --current --namespace=kube-system
</code></pre>
<p>After you do that you can work with resources in <code>kube-system</code> without setting <code>-n kube-system</code>.</p>
