Search code examples
kubernetesgpu

Can kubernetes shared single GPU between pods?


Is there a possibility to share a single GPU between kubernetes pods ?


Solution

  • As the official doc says

    GPUs are only supposed to be specified in the limits section, which means:

    You can specify GPU limits without specifying requests because Kubernetes will use the limit as the request value by default.

    You can specify GPU in both limits and requests but these two values must be equal.

    You cannot specify GPU requests without specifying limits. Containers (and pods) do not share GPUs. There’s no overcommitting of GPUs.

    Each container can request one or more GPUs. It is not possible to request a fraction of a GPU.

    Also, you can follow this discussion to get a little bit more information.