"executable file not found in $PATH" error when running oc exec command in OpenShift

Solution Unverified - Updated -

Issue

  • The following error occurs when executing an environment variable assignment command using the oc exec command.
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:235: starting container process caused "exec: \"TEST_ENV=0\": executable file not found in $PATH"

Environment

  • OpenShift Container Platform

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