'CreateContainerError' when using a NFS PersistentVolume as the workdir of a container

Solution Unverified - Updated -

Issue

  • Is there a way to use a NFS PersistentVolume as the workdir of a container?
  • Using a NFS PersistentVolume as the workdir of a container works on OCP 3.11. On OCP 4.5 CreateContainerError is shown:

    Error: container create failed: time="2020-08-31T11:09:16Z" level=error msg="container_linux.go:348: starting container process caused \"chdir to cwd (\\\"/prometheus\\\") set in config.json failed: permission denied\"" container_linux.go:348: starting container process caused "chdir to cwd (\"/prometheus\") set in config.json failed: permission denied"
    

Environment

  • Red Hat OpenShift Container Platform (OCP) 4.5
  • PersistentVolumes on NFS

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