Oren_C
Oren_C

Reputation: 761

Is there a way to make system requirement checks from inside a kubernetes container?

I need to check if dkms is installed on my host, and if it is, I need to check that it's associated with a specific driver. This check is intended to happen from inside a privileged container in Kubernetes. The purpose is to facilitate system requirements check for some drivers or packages our product needs to work.

I tried to follow this guide, but I'm not getting anywhere. It assumes I'm using docker (our cluster uses podman) and also requires me to install packages on my host (nsenter), which I want to avoid. What am I missing?

How do I access dkms from a privileged container?

Upvotes: 0

Views: 94

Answers (1)

Fariya Rahmat
Fariya Rahmat

Reputation: 3235

DKMS is supported by running the DKMS scripts inside a privileged container.

As given in the document:

To deploy containers that compiles DKMS modules, you will need to ensure that you bind-mount /usr/src and /lib/modules.

To deploy containers that run any DKMS operations (i.e., modprobe), you will need to ensure that you bind-mount /lib/modules

By default, the /lib/modules folder is already available in the console deployed via RancherOS System Services, but not /usr/src. You will likely need to deploy your own container for compilation purposes.

Upvotes: 1

Related Questions