我想知道 RAM 的当前限制。 (没有明确配置限制/请求。)
如何查看现有 Pod 的当前配置?
[编辑] 该配置不仅包括现在正在使用的内存量,还包括最大限制,即关闭的时间点。
(如果我用巨大的字符串炸毁堆,我会看到大约 4 GB 的限制,并且 Google Cloud Console 显示崩溃在 5.4 GB(这当然包括比 Python 解释器更多),但我不知道在哪里这来自。节点最多有 10 GB。)
我试过 kubectl get pod id-for-the-pod -o yaml
,但它没有显示任何内存。
我正在使用 Google 容器引擎。
最佳答案
使用 kubectl top 命令kubectl top pod id-for-the-pod
kubectl top --help
Display Resource (CPU/Memory/Storage) usage.
The top command allows you to see the resource consumption for nodes or pods.
This command requires Heapster to be correctly configured and working on the server.
Available Commands: node Display Resource (CPU/Memory/Storage) usage of nodes pod Display Resource (CPU/Memory/Storage) usage of pods
Usage: kubectl top [flags] [options]
关于kubernetes - 我的 Kubernetes pod 可以增长到多少 RAM?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53812196/