Listing GPU Device IDs Used by a Pod/Container

Good day everyone.

I’m wondering if there are ways to find what GPU device IDs are assigned to a given pod or container running on multi-GPU nodes.

The current solution I know of is having the pods expose the information by themselves (as environment variables, volumes, or a /metrics endpoint for Prometheus to scrap). But I’d like to avoid this in case there are alternative solutions.

Thank you.