Is kubectl top the current memory / CPU value?

11/7/2018

Is kubectl top the current memory / CPU value or is it an average of a certain time period ?

-- user2062360
kubectl
kubernetes

1 Answer

11/8/2018

It's the actual usage of the pods and nodes at the moment you issue the command.

Example:

$ kubectl top nodes
NAME                                         CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%
ip-xxx-xx-x-xxx.us-west-2.compute.internal   62m          6%     1014Mi          27%

Using 62 milicores(0.062 cores), 6% of the CPUs, 1014 Mebybites and 24% of the memory at the moment the API returned.

You can also find more information here.

-- Rico
Source: StackOverflow