I installed kubernetes dashboard by referring kubernetes.io, everything was fine (I edited the pod and replaced cluster-ip with Nodeport)
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 kubectl logs podname
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.
You need to have namespacename using -n
flag to the kubectl logs
command. Without namespacename it looks for the pod in default
namespace but your pod is in kubernetes-dashboard
namespace.
kubectl logs podname -n kubernetes-dashboard