Chapter 3. Gathering diagnostic information for support
When you open a support case, you must provide debugging information about your cluster to the Red Hat Support team. You can use the must-gather tool to collect diagnostic information for project-level resources, cluster-level resources, and Red Hat OpenShift Pipelines components.
For prompt support, provide diagnostic information for both OpenShift Container Platform and Red Hat OpenShift Pipelines.
3.1. About the must-gather tool Copy linkLink copied to clipboard!
The oc adm must-gather tool collects diagnostic information about your cluster, such as resource definitions, configurations, and logs for project-level and cluster-level resources.
When you run the command, the tool performs the following actions:
- Creates a new namespace on the cluster specifically for the collection process.
-
Spawns one or more
must-gatherpods within that namespace. - Executes scripts inside the pods to gather logs, custom resource definitions (CRDs), and system states from the relevant nodes and control plane components.
-
Streams the collected data back to your local machine and saves it into a newly created directory starting with
./must-gather.local.
By default, the tool collects data across core cluster components. When troubleshooting issues specific to Red Hat OpenShift Pipelines, you specify the OpenShift Pipelines must-gather image to capture components like the operator subscription, Tekton configurations, task runs, pipeline runs, and pod logs in the operator namespaces.
3.2. Collecting OpenShift Pipelines debugging data Copy linkLink copied to clipboard!
You can use the oc adm must-gather CLI command to collect detailed diagnostic data and logs for OpenShift Pipelines components on your cluster.
Prerequisites
-
You have access to the cluster as a user with the
cluster-admincluster role. -
You have installed the OpenShift CLI (
oc).
Procedure
- Navigate to the directory where you want to store the debugging information.
Run the
oc adm must-gathercommand with the OpenShift Pipelinesmust-gatherimage:$ oc adm must-gather --image=quay.io/openshift-pipeline/must-gatherThe
must-gathertool creates a new directory starting with./must-gather.localin your current directory, for example,./must-gather.local.4157245944708210399.Create a compressed file from the directory created by the
must-gathertool. For example, on a computer running a Linux operating system, run the following command:$ tar -cvaf must-gather.tar.gz must-gather.local.<random-hash>Replace
must-gather.local.<random-hash>with the actual name of the generated directory.
Verification
Verify that the compressed file exists in your current directory:
$ ls -lh must-gather.tar.gzExample output
-rw-r--r--. 1 user user 2.5M Jun 26 14:30 must-gather.tar.gz