OpenShift - oc adm diagnostics command

by
Jeremy Canfield |
Updated: September 28 2020
| OpenShift articles
The oc adm diagnostics command can be used to potentially spot errors or issues with a host or cluster.
oc adm diagnostics
Here is a few example warnings/errors that the oc adm diagnostics command could return.
ERROR: [AGL0090 from diagnostic AggregatedLogging@openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics/cluster/aggregated_logging/diagnostic.go:138]
The Pod 'logging-es-data-master-p11kcvnj-23-86sjl' matched by DeploymentConfig 'logging-es-data-master-p11kcvnj' is not in 'Running' status: Failed.
Depending upon the state, this could mean there is an error running the image
for one or more pod containers, the node could be pulling images, etc. Try running
the following commands for additional information:
$ oc describe pod logging-es-data-master-p11kcvnj-23-86sjl -n openshift-logging
$ oc logs logging-es-data-master-p11kcvnj-23-86sjl -n openshift-logging
$ oc get events -n openshift-logging
WARN: [DCli2006 from diagnostic DiagnosticPod@openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics/client/pod/run_diagnostics_pod.go:187]
Timed out preparing diagnostic pod logs for streaming, so this diagnostic cannot run.
It is likely that the image 'registry.redhat.io/openshift3/ose-deployer:v3.11.219' was not pulled and running yet.
Last error: (*errors.StatusError[2]) container "pod-diagnostics" in pod "pod-diagnostic-test-86nx8" is waiting to start: image can't be pulled
Did you find this article helpful?
If so, consider buying me a coffee over at