How to use a hostPath volume as persistent storage in OpenShift container image registry

Solution In Progress - Updated -

Issue

  • OpenShift Container Registry uses ephemeral storage by default if no specific storage options are defined in the inventory file. The problem with this set up is that all images kept in the registry will be lost if the registry pod terminates, even if it is started again.
  • A hostPath volume is a type of storage used by OpenShift that is backed by a directory in the local filesystem of one node. A hostPath volume is a useful alternative to the network storage systems in case the application, the registry in this case, is deployed as a single pod and always runs in the same node.

Environment

  • OpenShift 3.7
  • OpenShift 3.9
  • OpenShift 3.10
  • OpenShift 3.11

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