<p>I installed kubernetes dashboard by referring kubernetes.io, everything was fine (I edited the pod and replaced cluster-ip with Nodeport)</p>
<p><a href="https://i.stack.imgur.com/FjRYp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FjRYp.png" alt="enter image description here" /></a></p>
<p>but the dashboard does not respond after some time of being logged in. Again I have to login using bearer token and again the cycle repeats after some time. when I checked the logs using <code>kubectl logs podname</code> it throws an error as no pods found by that name but if I pass kubectl get pods it shows as the pod is running and even I can able to access it.</p>

<p>You need to have namespacename using <code>-n</code> flag to the <code>kubectl logs</code> command. Without namespacename it looks for the pod in <code>default</code> namespace but your pod is in <code>kubernetes-dashboard</code> namespace.</p>
<pre><code>kubectl logs podname -n kubernetes-dashboard
</code></pre>
