mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
93 lines
3.4 KiB
Plaintext
93 lines
3.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * support/gathering-cluster-data.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="support_gathering_data_{context}"]
|
|
= Gathering data about your cluster for Red Hat Support
|
|
|
|
You can gather debugging information about your cluster by using the `oc adm must-gather` CLI command.
|
|
|
|
ifndef::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
|
|
If you are gathering information to debug a self-managed hosted cluster, see "Gathering information to troubleshoot {hcp}".
|
|
endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]
|
|
|
|
.Prerequisites
|
|
|
|
* You have access to the cluster as a user with the `cluster-admin` role.
|
|
+
|
|
ifdef::openshift-dedicated[]
|
|
[NOTE]
|
|
====
|
|
In {product-title} deployments, customers who are not using the Customer Cloud Subscription (CCS) model cannot use the `oc adm must-gather` command as it requires `cluster-admin` privileges.
|
|
====
|
|
endif::openshift-dedicated[]
|
|
+
|
|
ifndef::openshift-rosa,openshift-dedicated[]
|
|
* The {product-title} CLI (`oc`) is installed.
|
|
endif::openshift-rosa,openshift-dedicated[]
|
|
ifdef::openshift-rosa,openshift-dedicated[]
|
|
* The OpenShift CLI (`oc`) is installed.
|
|
endif::openshift-rosa,openshift-dedicated[]
|
|
|
|
|
|
.Procedure
|
|
|
|
. Navigate to the directory where you want to store the `must-gather` data.
|
|
+
|
|
|
|
ifndef::openshift-rosa,openshift-dedicated[]
|
|
[NOTE]
|
|
====
|
|
If your cluster is in a disconnected environment, you must take additional steps. If your mirror registry has a trusted CA, you must first add the trusted CA to the cluster. For all clusters in disconnected environments, you must import the default `must-gather` image as an image stream.
|
|
|
|
[source,terminal]
|
|
----
|
|
$ oc import-image is/must-gather -n openshift
|
|
----
|
|
====
|
|
endif::openshift-rosa,openshift-dedicated[]
|
|
|
|
. Run the `oc adm must-gather` command:
|
|
+
|
|
[source,terminal]
|
|
|
|
----
|
|
$ oc adm must-gather
|
|
----
|
|
+
|
|
ifndef::openshift-rosa,openshift-dedicated[]
|
|
[IMPORTANT]
|
|
====
|
|
If you are in a disconnected environment, use the `--image` flag as part of must-gather and point to the payload image.
|
|
====
|
|
+
|
|
endif::openshift-rosa,openshift-dedicated[]
|
|
[NOTE]
|
|
====
|
|
Because this command picks a random control plane node by default, the pod might be scheduled to a control plane node that is in the `NotReady` and `SchedulingDisabled` state.
|
|
====
|
|
|
|
.. If this command fails, for example, if you cannot schedule a pod on your cluster, then use the `oc adm inspect` command to gather information for particular resources.
|
|
+
|
|
[NOTE]
|
|
====
|
|
Contact Red Hat Support for the recommended resources to gather.
|
|
====
|
|
|
|
. Create a compressed file from the `must-gather` directory that was just created in your working directory. Make sure you provide the date and cluster ID for the unique must-gather data. For more information about how to find the cluster ID, see link:https://access.redhat.com/solutions/5280291[How to find the cluster-id or name on OpenShift cluster]. For example, on a computer that uses a Linux operating system, run the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ tar cvaf must-gather-`date +"%m-%d-%Y-%H-%M-%S"`-<cluster_id>.tar.gz <must_gather_local_dir> <1>
|
|
----
|
|
<1> Replace `<must_gather_local_dir>` with the actual directory name.
|
|
|
|
ifndef::openshift-origin[]
|
|
. Attach the compressed file to your support case on the link:https://access.redhat.com/support/cases/#/case/list[the *Customer Support* page] of the Red Hat Customer Portal.
|
|
endif::[]
|
|
|
|
ifdef::openshift-origin[]
|
|
. Attach the compressed file to the bugreport
|
|
endif::[]
|