Can anyone help me in getting logs… I am unable to get logs of any pod in my cluster using kubectl logs command
Are your pods in the running state? Is the service verbose?
A common mistake is having pod container crashing, either due to the app or the probes. So when you try to read the logs it always return nothing because the pod either just got created or is waiting to restart. You can try the “-p” switch to read the previous container run.
Are not seeing any logs from the container or the app logs that you were expecting? Please note that Windows logs do not show up by default with kubectl logs. This is because Windows does not show logs on STDOUT by default, like Linux. To solve that, you can use Log Monitor: windows-container-tools/LogMonitor at main · microsoft/windows-container-tools (github.com)
I wrote a blog post about it here: Windows Containers Log Monitor Opensource Release - Microsoft Community Hub