You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Actuallize podresources description
This commit updates description according to
kubernetes/enhancements#1884
Update content/en/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md
Signed-off-by: Alexey Perevalov <[email protected]>
Co-authored-by: Tim Bannister <[email protected]>
* podresources: document the new feature gate
Signed-off-by: Francesco Romani <[email protected]>
* device plugins: add clarifications after review
- fix the AllocatableResourcesResponse comment
- describe the NUMA ID and explain the meaning of the field.
Signed-off-by: Francesco Romani <[email protected]>
Co-authored-by: Alexey Perevalov <[email protected]>
Co-authored-by: Tim Bannister <[email protected]>
The `List` endpoint provides information on resources of running pods, with details such as the
201
+
id of exclusively allocated CPUs, device id as it was reported by device plugins and id of
202
+
the NUMA node where these devices are allocated.
203
+
204
+
```gRPC
205
+
// ListPodResourcesResponse is the response returned by List function
206
+
message ListPodResourcesResponse {
207
+
repeated PodResources pod_resources = 1;
208
+
}
209
+
210
+
// PodResources contains information about the node resources assigned to a pod
211
+
message PodResources {
212
+
string name = 1;
213
+
string namespace = 2;
214
+
repeated ContainerResources containers = 3;
215
+
}
216
+
217
+
// ContainerResources contains information about the resources assigned to a container
218
+
message ContainerResources {
219
+
string name = 1;
220
+
repeated ContainerDevices devices = 2;
221
+
repeated int64 cpu_ids = 3;
222
+
}
223
+
224
+
// Topology describes hardware topology of the resource
225
+
message TopologyInfo {
226
+
repeated NUMANode nodes = 1;
227
+
}
228
+
229
+
// NUMA representation of NUMA node
230
+
message NUMANode {
231
+
int64 ID = 1;
232
+
}
233
+
234
+
// ContainerDevices contains information about the devices assigned to a container
235
+
message ContainerDevices {
236
+
string resource_name = 1;
237
+
repeated string device_ids = 2;
238
+
TopologyInfo topology = 3;
239
+
}
240
+
```
241
+
242
+
GetAllocatableResources provides information on resources initially available on the worker node.
243
+
It provides more information than kubelet exports to APIServer.
244
+
245
+
```gRPC
246
+
// AllocatableResourcesResponses contains informations about all the devices known by the kubelet
247
+
message AllocatableResourcesResponse {
248
+
repeated ContainerDevices devices = 1;
249
+
repeated int64 cpu_ids = 2;
250
+
}
251
+
252
+
```
253
+
254
+
`ContainerDevices` do expose the topology information declaring to which NUMA cells the device is affine.
255
+
The NUMA cells are identified using a opaque integer ID, which value is consistent to what device
256
+
plugins report [when they register themselves to the kubelet](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#device-plugin-integration-with-the-topology-manager).
257
+
258
+
199
259
The gRPC service is served over a unix socket at `/var/lib/kubelet/pod-resources/kubelet.sock`.
200
260
Monitoring agents for device plugin resources can be deployed as a daemon, or as a DaemonSet.
201
261
The canonical directory `/var/lib/kubelet/pod-resources` requires privileged access, so monitoring
@@ -204,7 +264,7 @@ DaemonSet, `/var/lib/kubelet/pod-resources` must be mounted as a
204
264
{{< glossary_tooltip term_id="volume" >}} in the device monitoring agent's
Support for the "PodResources service" requires `KubeletPodResources`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled.
267
+
Support for the `PodResourcesLister service` requires `KubeletPodResources`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled.
208
268
It is enabled by default starting with Kubernetes 1.15 and is v1 since Kubernetes 1.20.
209
269
210
270
## Device Plugin integration with the Topology Manager
@@ -256,5 +316,3 @@ Here are some examples of device plugin implementations:
256
316
* Learn about [advertising extended resources](/docs/tasks/administer-cluster/extended-resource-node/) on a node
257
317
* Read about using [hardware acceleration for TLS ingress](https://kubernetes.io/blog/2019/04/24/hardware-accelerated-ssl/tls-termination-in-ingress-controllers-using-kubernetes-device-plugins-and-runtimeclass/) with Kubernetes
258
318
* Learn about the [Topology Manager](/docs/tasks/administer-cluster/topology-manager/)
-`KubeletPodResourcesGetAllocatable`: Enable the kubelet's pod resources `GetAllocatableResources` functionality.
680
+
This API augments the [resource allocation reporting](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#monitoring-device-plugin-resources)
681
+
with informations about the allocatable resources, enabling clients to properly track the free compute resources on a node.
678
682
-`LegacyNodeRoleBehavior`: When disabled, legacy behavior in service load balancers and
679
683
node disruption will ignore the `node-role.kubernetes.io/master` label in favor of the
680
684
feature-specific labels provided by `NodeDisruptionExclusion` and `ServiceNodeExclusion`.
0 commit comments