Closed jicki closed 4 months ago
I am not testing for the medium memory part, but other than that, we do have a metric for this that should meet your need.
ephemeral_storage_container_volume_limit_percentage
Here is what our test looks like.
So if you deploy with dev.enabled: true
in your values, you can see the grow and shrink pods in action that will reflect this metric.
I am not testing for the medium memory part, but other than that, we do have a metric for this that should meet your need.
ephemeral_storage_container_volume_limit_percentage
Here is what our test looks like.
So if you deploy with
dev.enabled: true
in your values, you can see the grow and shrink pods in action that will reflect this metric.
ephemeral_storage_container_volume_limit_percentage
This metric only takes effect when using the sizeLimit of an empty directory.
I tested the metric ephemeral_storage_pod_usage
, and in the case where the empty directory type is memory, there will be no increment. Also, if a pod has multiple containers, the display can become cluttered. It would be better if mount points could be loaded and containers displayed separately.
ephemeral_storage_container_volume_limit_percentage This metric only takes effect when using the sizeLimit of an empty directory.
Correct, this is intended since we need to know the size limit/ceiling to get the percentage.
I tested the metric ephemeral_storage_pod_usage, and in the case where the empty directory type is memory, there will be no increment.
My guess is CaAdvisor is not reflecting it correctly when medium: Memory
. Here is the raw command that I source from.
node_name="your-node"
kubectl get --raw "/api/v1/nodes/$node_name/proxy/stats/summary"
...
"ephemeral-storage": {
"time": "2024-04-25T03:29:01Z",
"availableBytes": 326768394240,
"capacityBytes": 983036076032,
"usedBytes": 8192,
"inodesFree": 50534940,
"inodes": 61030400,
"inodesUsed": 2
},
Curious to what you find.
Also, if a pod has multiple containers, the display can become cluttered. It would be better if mount points could be loaded and containers displayed separately.
Could you share of the sample output of what you are wanting? ex.
ephemeral_storage_pod_usage{node_name="minikube",pod_name="etcd-minikube",pod_namespace="kube-system"} 8192
Thanks!
I've submitted a PR; you can take a look. https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics/pull/87
@jicki you change is live in 1.9.0
ephemeral_storage_pod_usage
. Can empty directory memory be supported?