-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Used ephemeral storage within kubectl top pod command #1696
Comments
This issue is currently awaiting triage. SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/cc |
This is a good addition for those who has use case. I'd like to work on it if it the triage is accpeted. |
@mpuckett159 can confirm this is something that we can add in the code. |
I would help with the documentation. |
sure, Let's first wait for the opinion on accepting the triage. |
I'm not sure if I understand it correctly, but does kubectl top pods fetch usage metrics for ephemeral storage? I tried it and it doesn't seem to. apiVersion: v1
kind: Pod
metadata:
name: example-pod-with-ephemeral-storage
spec:
containers:
- name: example-container
image: nginx
resources:
requests:
ephemeral-storage: "500Mi"
limits:
ephemeral-storage: "1Gi"
volumeMounts:
- name: ephemeral-storage-volume
mountPath: /tmp
volumes:
- name: ephemeral-storage-volume
emptyDir: {}
root@VM-0-3-ubuntu:/home/ubuntu# curl localhost:8181/apis/metrics.k8s.io/v1beta1/namespaces/default/pods/example-pod-with-ephemeral-storage
{
"kind": "PodMetrics",
"apiVersion": "metrics.k8s.io/v1beta1",
"metadata": {
"name": "example-pod-with-ephemeral-storage",
"namespace": "default",
"creationTimestamp": "2025-01-09T13:46:04Z"
},
"timestamp": "2025-01-09T13:45:39Z",
"window": "17.913s",
"containers": [
{
"name": "example-container",
"usage": {
"cpu": "0",
"memory": "4620Ki"
}
}
]
}root@VM-0-3-ubuntu:/home/ubuntu# kubectl top pods
NAME CPU(cores) MEMORY(bytes)
example-pod-with-ephemeral-storage 0m 4Mi
root@VM-0-3-ubuntu:/home/ubuntu# kubectl top pods
NAME CPU(cores) MEMORY(bytes)
example-pod-with-ephemeral-storage 0m 4Mi |
No, it does not, right now the metric is available by proxying the kubelet stats. |
So currently the metrics server does not support ephemeral storage. I think it is not a good time to support this feature. |
We'll discuss this next biweekly meeting. |
Is there any update on this after the biweekly meeting? I checked the notes and didnt find any mention of this one. It will nice to get more community opinion on this . |
This will be handled in kubernetes/enhancements#5106 |
@ardaguclu: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Hi @ardaguclu, just a question. As far as I understood, kubernetes/enhancements#5106 is about PVC usage, but not about ephemeral storage usage like in an EmptyDir or Pod filesystem. (local node storage) Is that correct? |
Actually you are right. I should reopen it. On the other hand, if you have a look at discussions in there, for PVC usage there are already built-in metrics that will be wired from metrics server to kubectl. For ephemeral storage part, I'm not sure if it exists or not. Therefore, I don't think in foreseeable future, we can add this functionality. |
/close |
@mpuckett159: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What would you like to be added:
It would be great to get also the current ephemeral storage usage with
kubectl top pods
command.Why is this needed:
This would give useres/me the option to quickly get an estimate for setting requests-and-limits-for-local-ephemeral-storage .
The text was updated successfully, but these errors were encountered: