How to configure nodes with node driver

Pods may have requirements for the node (Longhorn needs open-iscsi, …). When I deploy nodes with a node driver, how can I fulfill them? Can I modify all nodes somehow (installing packages, configuring firewall, …)? Just on installation with cloudInit? Or are there other possibilities with Rancher?

my own hints/guesses/…:

Rancher develops, which can be configured from kubernetes.

I guess, for other cases, there is no access from rancher. So probably use a configuratoin tool like ansible, salt, chef and maybe detect the inventoiry automatically.

I found a post doing configuration with ansible, and showing an alternative with scripts from cloud-init.

An other possibility could be in k8s itself:
Create a DeamonSet with a pod containing

  • an init container with necessary privileges to adatp the host
  • an app container running rancher/pause

The init container would run on creation (of node or DeaemonCreation) and on reboot. So it must be idempotent (run several times and keep the same state)

Idea from

I forgot the link for "alternative with script from clould-init*: