Add. 追加命令-查看node的资源使用情况

This commit is contained in:
ben.guo 2024-05-11 15:21:50 +08:00
parent a48d230ca6
commit eef8f2929f

View File

@ -58,6 +58,14 @@ kubectl cluster-info
kubectl top node
~~~
查看node的资源使用情况
~~~
for node in `kubectl get node | awk '{print $1}'|grep -v NAME`;do echo "======$node"; echo "==Capacity:" ;kubectl describe node $node | grep -A 12 "Capacity:" | grep -E "cpu:|memory:|nvidia.com\/gpu|vcuda-core|vcuda-memory:"; echo "=request&limit:"; kubectl describe node $node |grep -E "cpu | memory |nvidia.com/gpu |vcuda-core |vcuda-memory " ;done
~~~
### 删重启遇事不决重启pod