How to create a custom Service and script to fire on OpenShift 4 nodes after boot (modifying /etc/hosts)

Solution Verified - Updated -

Issue

  • It may be necessary to deploy a custom script or modifications to your OpenShift 4 CoreOS nodes after deployment, and the file you are attempting to modify may be managed or generated by a custom service
  • How to modify /etc/hosts on OpenShift 4, or how to modify other target files that are otherwise managed by scripts on CoreOS
  • How to deploy a custom service for one-shot changes to an OpenShift node?

Environment

  • Red Hat OpenShift Container Platform (RHOCP) 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content