Difference between revisions of ".status.capacity"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
* <code>[[kubectl get nodes]] -o json | [[jq]] ".items[] | {name:.metadata.name} + .status.capacity"</code>
 
* <code>[[kubectl get nodes]] -o json | [[jq]] ".items[] | {name:.metadata.name} + .status.capacity"</code>
  
<pre>
+
{
+
{
 
   "name": "node1",
 
   "name": "node1",
 
   "cpu": "8",
 
   "cpu": "8",
   "ephemeral-storage": "65504Mi",
+
   "[[ephemeral-storage]]": "65504Mi",
 
   "hugepages-1Gi": "0",
 
   "hugepages-1Gi": "0",
 
   "hugepages-2Mi": "1364Mi",
 
   "hugepages-2Mi": "1364Mi",
 
   "memory": "32946972Ki",
 
   "memory": "32946972Ki",
 
   "pods": "110"
 
   "pods": "110"
}
+
}
{
+
{
 
   "name": "node2",
 
   "name": "node2",
 
   "cpu": "8",
 
   "cpu": "8",
Line 19: Line 19:
 
   "memory": "32946972Ki",
 
   "memory": "32946972Ki",
 
   "pods": "110"
 
   "pods": "110"
}
+
}
{
+
{
 
   "name": "node3",
 
   "name": "node3",
 
   "cpu": "8",
 
   "cpu": "8",
Line 28: Line 28:
 
   "memory": "32946972Ki",
 
   "memory": "32946972Ki",
 
   "pods": "110"
 
   "pods": "110"
}
+
}
</pre>
 
  
  
 
{{kubectl get nodes}}
 
{{kubectl get nodes}}

Revision as of 11:39, 20 March 2024


{
 "name": "node1",
 "cpu": "8",
 "ephemeral-storage": "65504Mi",
 "hugepages-1Gi": "0",
 "hugepages-2Mi": "1364Mi",
 "memory": "32946972Ki",
 "pods": "110"
}
{
 "name": "node2",
 "cpu": "8",
 "ephemeral-storage": "65504Mi",
 "hugepages-1Gi": "0",
 "hugepages-2Mi": "1364Mi",
 "memory": "32946972Ki",
 "pods": "110"
}
{
 "name": "node3",
 "cpu": "8",
 "ephemeral-storage": "65504Mi",
 "hugepages-1Gi": "0",
 "hugepages-2Mi": "1364Mi",
 "memory": "32946972Ki",
 "pods": "110"
}


kubectl get nodes: -A

Advertising: