Enhanced Kubernetes Pod Label Support with Kubelet API Integration#592
Open
Raid57 wants to merge 4 commits intoNVIDIA:mainfrom
Open
Enhanced Kubernetes Pod Label Support with Kubelet API Integration#592Raid57 wants to merge 4 commits intoNVIDIA:mainfrom
Raid57 wants to merge 4 commits intoNVIDIA:mainfrom
Conversation
Collaborator
|
Thanks for this PR! Would it be possible to add a few unit tests or integration tests in |
Author
|
Sure! I’ll add some tests soon. |
To Verify Get Pod Labels With Kubelet API
Author
i‘ve submitted,waiting for your review~ |
Collaborator
|
Thanks for updating the PR with some tests! We are planning to test and validate this MR for our next major release in January 2026. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds upon the existing Kubernetes pod label support PR #515 and label filtering feature PR #564 by adding kubelet API integration. This enables more granular GPU application classification, better GPU utilization tracking, and support for internal scheduling labels (e.g.,
accelerator,quota) to better understand GPU card type utilization patterns, while significantly reducing API server load in large clusters.We have been successfully running these changes in production environments, and they significantly improve observability and performance for GPU resource management in large-scale Kubernetes clusters.
Implementation
Extends the existing
PodMapperwith kubelet API integration.Key Features
/podsAPI instead of API server for fetching pod metadata (labels, UID), reducing API server load in large clustersConfiguration
Command Line Flags
Environment Variables
DCGM_EXPORTER_KUBERNETES_USE_KUBELET_API=true DCGM_EXPORTER_KUBERNETES_KUBELET_URL=https://127.0.0.1:10250 DCGM_EXPORTER_KUBERNETES_POD_LABEL_ALLOWLIST_REGEX="^accelerator$,^quota$" DCGM_EXPORTER_KUBERNETES_POD_LABEL_CACHE_SIZE=150000Helm Chart Configuration
Use Cases
acceleratorlabel to track utilization by GPU model/typeaccelerator: "nvidia-tesla-v100"oraccelerator: "nvidia-a100"quotalabel to track GPU usage by quota/resource poolRelated PRs and Issues
This enhancement builds upon:
labelFilterCacheand label filtering functionality)