After some research, I found out that, kubernetes logs -f <pod>
reads logs from files, i.e, .log files to which docker containers running inside the pods have written the logs. In my case, docker container is an application that I have written. Now, say I have disabled logging in my application expecting that RAM usage on the system will reduce.
With logging enabled in my application, I kept track of CPU and MEM usage
Commands used:
a.
top | grep dockerd
b.
top | grep containerd-shim
Without logging enabled also, I kept track of CPU and MEM usage.
But I didn't find any difference. Could anyone explain what is happening here internally?