xpu-gpu) is used to manage and schedule Kunlunxin XPU accelerator card resources in Tencent Cloud TKE clusters. The component helps run containers that require XPU resources by automatically discovering Kunlunxin XPU (kunlunxin.com/xpu) on nodes as schedulable resources. It also automatically deploys a monitoring exporter to provide XPU device monitoring metrics in standard Prometheus format.kube-system namespace.Object name | Type | Feature Description |
xpu-device-plugin-daemonset | DaemonSet | A Device Plugin that discovers XPU devices on nodes and registers and reports them to kubelet for scheduling by business Pods. |
xpu-exporter | DaemonSet | XPU device metrics collector that exposes monitoring metrics in standard Prometheus format. |
xpu-rbac-token-gen | DaemonSet | Synchronizes the ServiceAccount token and ca.crt to the XPU runtime directory on nodes for the XPU runtime to access the cluster API. |
xpu-device-plugin | ServiceAccount / ClusterRole / ClusterRoleBinding | Permissions required for Device Plugin to run. |
xpu-exporter | ServiceAccount / ClusterRole / ClusterRoleBinding | Permissions required for Exporter to run. |
klx-xpu-serviceaccount / klx-xpu-clusterrole / klx-xpu-binding | ServiceAccount / ClusterRole / ClusterRoleBinding | Permissions required for the token synchronization component to run. |
kunlunxin.com/xpu. This mode is suitable for scenarios that require high computing power and do not need resource sharing, such as training.xpu-exporter runs as a DaemonSet on each XPU node and obtains the device-to-Pod ownership relationship through /var/lib/kubelet/pod-resources/. It can provide XPU monitoring metrics at the card, Pod, and container levels for Prometheus to collect.kunlun-device-enable=enable label. The component is not deployed on nodes without this label, and such nodes do not report XPU resources.xpu-device-plugin and xpu-exporter containers run in privileged: true mode to access the /dev device nodes and device management interfaces on the node.xpu-rbac-token-gen periodically writes the ServiceAccount token and ca.crt to the host directory /xpu-runtime/auth on the node. Ensure that access to the host of the XPU node is controlled.Feature Module | Involved Object | Involved Operation Permissions |
Device discovery and reporting (xpu-device-plugin) | nodes,nodes/proxy | get,list,watch,patch |
Device discovery and reporting (xpu-device-plugin) | nodes/status | patch,update |
Device discovery and reporting (xpu-device-plugin) | pods | get,list,watch,update,patch |
Device discovery and reporting (xpu-device-plugin) | events | create,patch |
Metric collection (xpu-exporter) | nodes,nodes/proxy | get,list,watch |
Metric collection (xpu-exporter) | nodes/status | patch,update |
Metric collection (xpu-exporter) | pods | get,list,watch,update,patch |
Metric collection (xpu-exporter) | events | create,patch |
Credential distribution (xpu-rbac-token-gen) | nodes,nodes/status,nodes/proxy,pods,events | get,list |
# 1. xpu-device-plugin PermissionsapiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:name: xpu-device-pluginrules:- apiGroups: [""]resources: ["nodes", "nodes/proxy"]verbs: ["get", "list", "watch", "patch"]- apiGroups: [""]resources: ["events"]verbs: ["create", "patch"]- apiGroups: [""]resources: ["pods"]verbs: ["update", "patch", "get", "list", "watch"]- apiGroups: [""]resources: ["nodes/status"]verbs: ["patch", "update"]---# 2. xpu-exporter PermissionsapiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:name: xpu-exporterrules:- apiGroups: [""]resources: ["nodes", "nodes/proxy"]verbs: ["get", "list", "watch"]- apiGroups: [""]resources: ["events"]verbs: ["create", "patch"]- apiGroups: [""]resources: ["pods"]verbs: ["update", "patch", "get", "list", "watch"]- apiGroups: [""]resources: ["nodes/status"]verbs: ["patch", "update"]---# 3. xpu-rbac-token-gen PermissionsapiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:name: klx-xpu-clusterrolerules:- apiGroups: [""]resources: ["nodes", "pods", "nodes/status", "events", "nodes/proxy"]verbs: ["get", "list"]
Parameter Name | Default Value | Description |
global.image.host | ccr.ccs.tencentyun.com | Component image repository address |
config.exporterPort | 9507 | Prometheus metrics collection port exposed by xpu-exporter |
config.logVerbose | 5 | Log verbosity level of xpu-device-plugin (corresponding to --v) |
config.memoryUnit | MiB | Unit of measurement for memory reported by xpu-device-plugin |
images.devicePlugin.tag | v5.0.2-alpha.3 | xpu-device-plugin image version |
images.exporter.tag | v5.0.3-alpha.6 | xpu_exporter image version |
images.rbacTokenGen.tag | v1.0.0 | xpu-rbac-token-gen image version |
exporter.goMemLimit | 800MiB | Go runtime memory limit of xpu-exporter ( GOMEMLIMIT) |
exporter.resources.requests.cpu | 100m | xpu-exporter CPU request |
exporter.resources.requests.memory | 100Mi | xpu-exporter memory request |
exporter.resources.limits.cpu | 1000m | xpu-exporter CPU limit |
exporter.resources.limits.memory | 1Gi | xpu-exporter memory limit |
nodeSelector | kunlun-device-enable: enable | Target node selector for component deployment |
global:image:host: ccr.ccs.tencentyun.comconfig:exporterPort: 9507logVerbose: 5memoryUnit: MiBexporter:goMemLimit: 800MiBresources:requests:cpu: 100mmemory: 100Milimits:cpu: 1000mmemory: 1GinodeSelector:kunlun-device-enable: enable
values.yaml, but are not yet referenced by the current chart template. Configuring them has no actual effect, so do not rely on them:Parameter Name | Default Value | Intended Use |
config.logLevel | info | Log level. |
devicePlugin.enableSriov | false | Enable vXPU (SR-IOV) virtualization or not. |
devicePlugin.sriovNumVfs | 0 | Number of vXPUs. |
devicePlugin.reconfigVxpu | false | Allow reconfiguring the number of vXPUs or not. |
devicePlugin.enableXpuShare | false | Enable XPU sharing mode or not. |
devicePlugin.useDetailResName | false | Report resource names by model or not (for example, kunlunxin.com/R200) |
devicePlugin.customizedResourceName | "" | Custom resource name (leave empty to use the default kunlunxin.com/xpu) |
tolerations | See values.yaml. | Tolerations (hardcoded in the current DaemonSet template) |
kubectl label node <node_name> kunlun-device-enable=enable
apiVersion: v1kind: Podmetadata:name: xpu-demospec:nodeSelector:kunlun-device-enable: enablecontainers:- name: demoimage: <your_business_image>resources:limits:kunlunxin.com/xpu: 1
kubectl describe node <node_name> | grep kunlunxin.com/xpu
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários