Unable to use Ping command inside OpenShift containers
Issue
- Error presented when attempting to use ping inside of a container:
$ oc rsh <my-container-with-ping> /bin/sh
# ping <upstream-address>
/bin/sh: 9: ./ping: Operation not permitted
- Running container as privileged may allow ping to work periodically or not at all, running as nonroot/unprivileged constantly returns this not permitted error above.
Environment
- OpenShift Container Platform (OCP) 3.11
- OpenShift Container Platform (OCP) 4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.