apiVersion: v1
kind: Namespace
metadata:
name: openshift-kmm
Learn about the Kernel Module Management (KMM) Operator and how you can use it to deploy out-of-tree kernel modules and device plugins on OKD clusters.
The Kernel Module Management (KMM) Operator manages, builds, signs, and deploys out-of-tree kernel modules and device plugins on OKD clusters.
KMM adds a new Module
CRD which describes an out-of-tree kernel module and its associated device plugin.
You can use Module
resources to configure how to load the module, define ModuleLoader
images for kernel versions, and include instructions for building and signing modules for specific kernel versions.
KMM is designed to accommodate multiple kernel versions at once for any kernel module, allowing for seamless node upgrades and reduced application downtime.
As a cluster administrator, you can install the Kernel Module Management (KMM) Operator by using the OpenShift CLI or the web console.
The KMM Operator is supported on OKD 4.12 and later. Installing KMM on version 4.11 does not require specific additional steps. For details on installing KMM on version 4.10 and earlier, see the section "Installing the Kernel Module Management Operator on earlier versions of OKD".
As a cluster administrator, you can install the Kernel Module Management (KMM) Operator using the OKD web console.
Log in to the OKD web console.
Install the Kernel Module Management Operator:
In the OKD web console, click Operators → OperatorHub.
Select Kernel Module Management Operator from the list of available Operators, and then click Install.
On the Install Operator page, select the Installation mode as A specific namespace on the cluster.
From the Installed Namespace list, select the openshift-kmm
namespace.
Click Install.
To verify that KMM Operator installed successfully:
Navigate to the Operators → Installed Operators page.
Ensure that Kernel Module Management Operator is listed in the openshift-kmm project with a Status of InstallSucceeded.
During installation, an Operator might display a Failed status. If the installation later succeeds with an InstallSucceeded message, you can ignore the Failed message. |
To troubleshoot issues with Operator installation:
Navigate to the Operators → Installed Operators page and inspect the Operator Subscriptions and Install Plans tabs for any failure or errors under Status.
Navigate to the Workloads → Pods page and check the logs for pods in the openshift-kmm
project.
As a cluster administrator, you can install the Kernel Module Management (KMM) Operator by using the OpenShift CLI.
You have a running OKD cluster.
You installed the OpenShift CLI (oc
).
You are logged into the OpenShift CLI as a user with cluster-admin
privileges.
Install KMM in the openshift-kmm
namespace:
Create the following Namespace
CR and save the YAML file, for example, kmm-namespace.yaml
:
apiVersion: v1
kind: Namespace
metadata:
name: openshift-kmm
Create the following OperatorGroup
CR and save the YAML file, for example, kmm-op-group.yaml
:
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: kernel-module-management
namespace: openshift-kmm
Create the following Subscription
CR and save the YAML file, for example, kmm-sub.yaml
:
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: kernel-module-management
namespace: openshift-kmm
spec:
channel: release-1.0
installPlanApproval: Automatic
name: kernel-module-management
source: redhat-operators
sourceNamespace: openshift-marketplace
startingCSV: kernel-module-management.v1.0.0
Create the subscription object by running the following command:
$ oc create -f kmm-sub.yaml
To verify that the Operator deployment is successful, run the following command:
$ oc get -n openshift-kmm deployments.apps kmm-operator-controller-manager
NAME READY UP-TO-DATE AVAILABLE AGE
kmm-operator-controller-manager 1/1 1 1 97s
The Operator is available.
The KMM Operator is supported on OKD 4.12 and later.
For version 4.10 and earlier, you must create a new SecurityContextConstraint
object and bind it to the Operator’s ServiceAccount
.
As a cluster administrator, you can install the Kernel Module Management (KMM) Operator by using the OpenShift CLI.
You have a running OKD cluster.
You installed the OpenShift CLI (oc
).
You are logged into the OpenShift CLI as a user with cluster-admin
privileges.
Install KMM in the openshift-kmm
namespace:
Create the following Namespace
CR and save the YAML file, for example, kmm-namespace.yaml
file:
apiVersion: v1
kind: Namespace
metadata:
name: openshift-kmm
Create the following SecurityContextConstraint
object and save the YAML file, for example, kmm-security-constraint.yaml
:
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegeEscalation: false
allowPrivilegedContainer: false
allowedCapabilities:
- NET_BIND_SERVICE
apiVersion: security.openshift.io/v1
defaultAddCapabilities: null
fsGroup:
type: MustRunAs
groups: []
kind: SecurityContextConstraints
metadata:
name: restricted-v2
priority: null
readOnlyRootFilesystem: false
requiredDropCapabilities:
- ALL
runAsUser:
type: MustRunAsRange
seLinuxContext:
type: MustRunAs
seccompProfiles:
- runtime/default
supplementalGroups:
type: RunAsAny
users: []
volumes:
- configMap
- downwardAPI
- emptyDir
- persistentVolumeClaim
- projected
- secret
Bind the SecurityContextConstraint
object to the Operator’s ServiceAccount
by running the following commands:
$ oc apply -f kmm-security-constraint.yaml
$ oc adm policy add-scc-to-user kmm-security-constraint -z kmm-operator-controller-manager -n openshift-kmm
Create the following OperatorGroup
CR and save the YAML file, for example, kmm-op-group.yaml
:
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: kernel-module-management
namespace: openshift-kmm
Create the following Subscription
CR and save the YAML file, for example, kmm-sub.yaml
:
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: kernel-module-management
namespace: openshift-kmm
spec:
channel: release-1.0
installPlanApproval: Automatic
name: kernel-module-management
source: redhat-operators
sourceNamespace: openshift-marketplace
startingCSV: kernel-module-management.v1.0.0
Create the subscription object by running the following command:
$ oc create -f kmm-sub.yaml
To verify that the Operator deployment is successful, run the following command:
$ oc get -n openshift-kmm deployments.apps kmm-operator-controller-manager
NAME READY UP-TO-DATE AVAILABLE AGE
kmm-operator-controller-manager 1/1 1 1 97s
The Operator is available.