• 1,346 Views

How are we supposed to debug containers in OpenShift?

In stock Kubernetes, you can apk add -U, apt-get update && apt-get install, yum update && yum install, etc. to setup additional debugging components on demand from a kube exec. Whereas in OpenShift, containers lose root privileges and run as a random user ID.

Barring bloated everything and the kitchen sink images, how are we supposed to debug our apps?

Labels (1)
0 Kudos
1 Reply
joelbirchler
Moderator
Moderator
  • 1,331 Views

There are often trade-offs between access and security. One mechanism that OpenShift provides for the use-case you describe is the `oc debug RESOURCE` command. Use the `--as-root` or `--as-user` options to change your user.

Try `oc debug -h` for a full description with examples.

0 Kudos
Join the discussion
You must log in to join this conversation.