How to assign a static IP address to RHCOS nodes on OpenShift 4

Solution Unverified - Updated

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4
  • Red Hat Enterprise Linux CoreOS (RHCOS)
    • 4
  • Static IP

Issue

  • During an Bare Metal UPI install where a DHCP server is not available, there is not a way to configure a static IP address.
  • Is it possible to configure static IP adress to RHCOS in OCP 4 vSphere installations?

Resolution

Starting with OpenShift 4.3, configuring static IP addresses on RHCOS nodes is entirely supported and explained in the bare metal installation document: creating Red Hat Enterprise Linux CoreOS (RHCOS) machines.

Starting in OpenShift 4.6, a new live installer environment is available. Networking can be configured from a live installer shell prompt, then those settings can be copied to the installed system so that they take effect when the installed system first boots. This is explained in the bare metal documentation section: advanced Red Hat Enterprise Linux CoreOS (RHCOS) installation configuration.

For vSphere installations, it is possible to configure static IP address for the UPI installation method, and documented in the creating Red Hat Enterprise Linux CoreOS (RHCOS) machines in vSphere, and refer also to scale MachineSet using static IP in OpenShift 4 on vSphere.

Root Cause

Starting with OpenShift 4.3, it was possible to configure static IP adresses on RHCOS nodes. In OpenShift 4.6 some improvements were included, like the configuration for vSphere using OVA.

SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.