Diagnosing OpenShift CLI (oc
) issues
If oc
command-specific issues arise, increase the log level to output API request, API response, and curl
request details generated by the command. This provides a granular view of a particular oc
command’s underlying operation, which in turn might provide insight into the nature of a failure.
oc
log levels range from 1 to 10. The following table provides a list of oc
log levels, along with their descriptions.
Specifying OpenShift CLI (oc
) log levels
You can investigate OpenShift CLI (oc
) issues by increasing the command’s log level.
Prerequisites
- Install the OpenShift CLI (
oc
).
Procedure
The OKD user’s current session token is typically included in logged
curl
requests where required. You can also obtain the current user’s session token manually, for use when testing aspects of an command’s underlying process step by step: