I followed the first possible solution in this page: Checking kubernetes pod CPU and memory
I tried the command:
kubectl exec pod_name -- /bin/bash
But it didn't work therefore I tried the command:
kubectl exec -n [namespace] [pod_name] -- cat test.log
I know this because when I run the command:
kubectl get pods --all-namespaces | grep [pod_name]
This is what I see:
But I get this error message:
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"cat\": executable file not found in $PATH": unknown
command terminated with exit code 126
Could you please let me know how to resolve this?
##UPDATE I tried the k9s tool and I also cannot see CPU, MEM of finished pods, is it normal that we cannot see CPU, MEM of the finished pods ?