1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/nodes-pods-plugins-install.adoc
2020-08-28 11:48:44 -04:00

82 lines
2.0 KiB
Plaintext

// Module included in the following assemblies:
//
// * nodes/nodes-pods-plugins.adoc
// * post_installation_configuration/node-tasks.adoc
[id="nodes-pods-plugins-install_{context}"]
= Enabling Device Manager
Enable Device Manager to implement a device plug-in to advertise specialized
hardware without any upstream code changes.
Device Manager provides a mechanism for advertising specialized node hardware resources
with the help of plug-ins known as device plug-ins.
. Obtain the label associated with the static Machine Config Pool CRD for the type of node you want to configure.
Perform one of the following steps:
.. View the Machine Config:
+
[source,terminal]
----
# oc describe machineconfig <name>
----
+
For example:
+
[source,terminal]
----
# oc describe machineconfig 00-worker
----
+
.Example output
[source,terminal]
----
Name: 00-worker
Namespace:
Labels: machineconfiguration.openshift.io/role=worker <1>
----
<1> Label required for the device manager.
.Procedure
. Create a Custom Resource (CR) for your configuration change.
+
.Sample configuration for a Device Manager CR
[source,yaml]
----
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
name: devicemgr <1>
spec:
machineConfigPoolSelector:
matchLabels:
machineconfiguration.openshift.io: devicemgr <2>
kubeletConfig:
feature-gates:
- DevicePlugins=true <3>
----
<1> Assign a name to CR.
<2> Enter the label from the Machine Config Pool.
<3> Set `DevicePlugins` to 'true`.
. Create the device manager:
+
[source,terminal]
----
$ oc create -f devicemgr.yaml
----
+
.Example output
[source,terminal]
----
kubeletconfig.machineconfiguration.openshift.io/devicemgr created
----
. Ensure that Device Manager was actually enabled by confirming that
*_/var/lib/kubelet/device-plugins/kubelet.sock_* is created on the node. This is
the UNIX domain socket on which the Device Manager gRPC server listens for new
plug-in registrations. This sock file is created when the Kubelet is started
only if Device Manager is enabled.