大网数据广告活动
服务器运维问答

Kubernetes: How can I get which pod schedule GPU?

· 52CE 我爱测

I have three Nvidia GPUs in my cluster, and so many pods are running in my cluster. How can I find which one of these pods schedule GPU and how many GPUs they schedule? I use this link to enable the GPU schedule in my cluster for…

问题原文

原帖链接 · Nader · CC BY-SA 4.0

I have three Nvidia GPUs in my cluster, and so many pods are running in my cluster. How can I find which one of these pods schedule GPU and how many GPUs they schedule?

I use this link to enable the GPU schedule in my cluster for Nvidia GPU. https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/

thanks

已采纳解答

原帖链接 · fuero · CC BY-SA 4.0

Here's the example given from a kubectl plugin, kubectl-view-allocations:

> kubectl-view-allocations -r gpu

 Resource                   Requested       Limit  Allocatable  Free
  nvidia.com/gpu           (71%) 10.0  (71%) 10.0         14.0   4.0
  ├─ node-gpu1               (0%)  __    (0%)  __          2.0   2.0
  ├─ node-gpu2               (0%)  __    (0%)  __          2.0   2.0
  ├─ node-gpu3             (100%) 2.0  (100%) 2.0          2.0    __
  │  └─ fah-gpu-cpu-d29sc         2.0         2.0           __    __
  ├─ node-gpu4             (100%) 2.0  (100%) 2.0          2.0    __
  │  └─ fah-gpu-cpu-hkg59         2.0         2.0           __    __
  ├─ node-gpu5             (100%) 2.0  (100%) 2.0          2.0    __
  │  └─ fah-gpu-cpu-nw9fc         2.0         2.0           __    __
  ├─ node-gpu6             (100%) 2.0  (100%) 2.0          2.0    __
  │  └─ fah-gpu-cpu-gtwsf         2.0         2.0           __    __
  └─ node-gpu7             (100%) 2.0  (100%) 2.0          2.0    __
     └─ fah-gpu-cpu-x7zfb         2.0         2.0           __    __

Seems to offer what you are looking for.

Furthermore apparently, sharing GPUs is possible (with Nvidia-provided software) - might be useful to you or whoever finds this in the future:

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-08-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。