Reputation: 752
I am making some tests, and I believe I may be misunderstanding how "allocatable" work. I have 2 nodes running on Azure-AKS, both with Memory capacity of 65 Gi, and nothing but some basic daemon running on them. When describing these nodes, I have for both about 59 Gi memory "allocatable".
Then I start a new pod, with a resources request and limit of 30Gi on one of these node. In practice, the pod use just a couple of Mo. I would be expecting the "allocatable" to reduce to 29 Gi, but it stays at 59 Gi.
If I am doing a describe, the "allocated" section will correctly display what I actually requested.
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
-------- -------- ------
memory 31190Mi (53%) 32170Mi (55%)
....
But not the allocatable:
Allocatable:
attachable-volumes-azure-disk: 16
cpu: 7820m
ephemeral-storage: 119716326407
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 59350320Ki
pods: 30
So, is allocatable supposed to take in account the requested resources of the pod ?
If yes, why is the value not decreasing here?
If no, how can I know what is the total amount of request/limit on one specific node (in a parsable format, such as json) ?
Upvotes: 0
Views: 1203
Reputation: 15500
is allocatable supposed to take in account the requested resources of the pod ?
No. Allocatable is your underlying instance capacity minus all the reserved (eg. system-reserved, kube-reserved, eviction threshold).
...how can I know what is the total amount of request/limit on one specific node?
You can continue use kubectl describe node
, or kubectl top node
, or kubernetes dasboard and many other monitoring tools out there.
Upvotes: 1