Skip to content

How to debug a pod (especially when it won't start up)

Sybrand Strauss edited this page May 22, 2020 · 1 revision

Log straight into the pod

oc rsh <podname>

Pro: Easy if the pod is running. Con: It's going to kick you out the moment it dies.

Start up a debug instance

oc debug dc/<deployment config name>

Before you do this, you may want to peek there are no other pods attaching to shared storage:

oc get pods

Or maybe scale down you dc so there aren't pods that keep trying to sneak in

oc scale dc <deployment config name> --replicas=0

You can debug a specific pod instance, but this may have mixed success

oc debug <my pods name>