How to Install additional package on cluster nodes

Latest response

How do I install additional rpm packages on to the OCP worker nodes. I tried rpm-ostree install and it failed with "error: No enabled repositories"

The output of 'rpm-ostree status' cmd is as follows

sh-4.4# rpm-ostree status
State: idle
* pivot://
CustomOrigin: Managed by machine-config-operator
Version: 47.83.202104250838-0 (2021-04-25T08:41:57Z)

Version: 47.83.202103251640-0 (2021-03-25T16:44:03Z)

Do I need to configure the repo, if so how? or
Do I need to use the MachineConfig and the operator to get this done?
This is post OCP install though.


According to RedHat, it is not possible to add packages just like one did with YUM or APT tools. Instead the use of DaemonSets, Operators or MachineConfigs on the Openshift 4.x is recommended.

Is there a relevant example to achieve it via MachineConfigs for ROSA?

You can add repo configurations to /etc/yum.repos.d. There is no subscription-manager in RHCOS, so there is no convenient way to access RHEL's yum repositories. You may have success installing from EPEL, etc.