Getting a node's available disk space #1567
Replies: 2 comments 1 reply
-
I run the "df" command inside a pod to get the information. The outside call goes to "CommandDf". In this example I locate diskspace in a timeseries database running in Azure AKS:
What you get from the "df" command is something like:
Note that some support methods are located in class GlobalSharedStringHelpers
I return this class.
I hope it is what you are looking for 🙂 |
Beta Was this translation helpful? Give feedback.
-
seems node spec do not have it today |
Beta Was this translation helpful? Give feedback.
-
Heya!
For a project I'm working on, I need to get information about how much available disk space each node has. After some research I found that I could get this information for a single node by running
kubectl get --raw "/api/v1/nodes/$(hostname)/proxy/stats/summary" | jq .node.fs
in bash, but I'm having a hard time figuring out how to call this API from my C# application. I would've expected this to be part of theV1Node
objects that I get fromclient.CoreV1.ListNodeAsync()
but either I'm overlooking it, or it's just not in there. I've only been able to find the available ephemeral storage, but that's not what I'm looking for.Does anyone know how I can retrieve this info? I'd rather not use
HttpClient
if I can avoid it.Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions