1

For regular pods (in running state), we can check the actual resource utilisation (runtime) using kubectl top pod <pod_name> command. However, for the job pods (execution is already complete), any way we can fetch how much resources were consumed by those pods?

Getting this info does help to better tune the resource allocation and also, whether we over/under provisioning the requests for the job pods.

Kuberenetes version

Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.3", GitCommit:"816c97ab8cff8a1c72eccca1026f7820e93e0d25", GitTreeState:"clean", BuildDate:"2022-01-25T21:25:17Z", GoVersion:"go1.17.6", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.13", GitCommit:"a43c0904d0de10f92aa3956c74489c45e6453d6e", GitTreeState:"clean", BuildDate:"2022-08-17T18:23:45Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}

If not any direct way, maybe a work-around to get this info.

Bill
  • 2,494
  • 5
  • 26
  • 61
Kalyani
  • 11
  • 2

1 Answers1

1

There is no command that can show a job resource utilisation. The only option is using an external tool like the prometheus or make a sidecar container with logging resources usage.