|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * hosted_control_planes/hcp-troubleshooting.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="hcp-must-gather-day-2_{context}"] |
| 7 | += Troubleshooting Day 2 operations for {hcp} |
| 8 | + |
| 9 | +To troubleshoot Day 2 operations for a hosted cluster, you run the `must-gather` command and review the output. |
| 10 | + |
| 11 | +The output for the management cluster contains the following content: |
| 12 | + |
| 13 | +* *Cluster-scoped resources:* These resources are node definitions of the management cluster. |
| 14 | +* *The `hypershift-dump` compressed file:* This file is useful if you need to share the content with other people. |
| 15 | +* *Namespaced resources:* These resources include all of the objects from the relevant namespaces, such as config maps, services, events, and logs. |
| 16 | +* *Network logs:* These logs include the OVN northbound and southbound databases and the status for each one. |
| 17 | +* *Hosted clusters:* This level of output involves all of the resources inside of the hosted cluster. |
| 18 | +
|
| 19 | +The output for the hosted cluster contains the following content: |
| 20 | + |
| 21 | +* *Cluster-scoped resources:* These resources include all of the cluster-wide objects, such as nodes and CRDs. |
| 22 | +* *Namespaced resources:* These resources include all of the objects from the relevant namespaces, such as config maps, services, events, and logs. |
| 23 | +
|
| 24 | +Although the output does not contain any secret objects from the cluster, it can contain references to the names of secrets. |
| 25 | + |
| 26 | +.Prerequisites |
| 27 | + |
| 28 | +* You must have `cluster-admin` access to the management cluster. |
| 29 | +
|
| 30 | +* You need the `name` value for the `HostedCluster` resource and the namespace where the CR is deployed. |
| 31 | +
|
| 32 | +* You must have the `hcp` command-line interface installed. For more information, see "Installing the {hcp} command-line interface". |
| 33 | +
|
| 34 | +* You must have the OpenShift CLI (`oc`) installed. |
| 35 | +
|
| 36 | +* You must ensure that the `kubeconfig` file is loaded and is pointing to the management cluster. |
| 37 | +
|
| 38 | +.Procedure |
| 39 | + |
| 40 | +You can collect must-gather information for a hosted cluster by using the {mce-short} web console or by using the `hcp` CLI. |
| 41 | + |
| 42 | +* To collect must-gather information by using the web console, complete the following steps: |
| 43 | ++ |
| 44 | +. In the web console, select *All Clusters* and select the cluster you want to troubleshoot. |
| 45 | +. In the upper-right corner, select *Download kubeconfig*. |
| 46 | +. Export the downloaded `kubeconfig` file. |
| 47 | +. Collect the must-gather information by entering the following command: |
| 48 | ++ |
| 49 | +[source,terminal] |
| 50 | +---- |
| 51 | +$ oc adm must-gather |
| 52 | +---- |
| 53 | +
|
| 54 | +* To collect must-gather information by using the `hcp` CLI, complete the following steps: |
| 55 | ++ |
| 56 | +. Generate the `kubeconfig` file by entering the following command: |
| 57 | ++ |
| 58 | +[source,terminal] |
| 59 | +---- |
| 60 | +$ hcp create kubeconfig --namespace <hosted_cluster_namespace> \ |
| 61 | + --name <hosted_cluster_name> > <hosted_cluster_name>.kubeconfig |
| 62 | +---- |
| 63 | +
|
| 64 | +. After you save the `kubeconfig` file, you can access the hosted cluster by entering the following example command: |
| 65 | ++ |
| 66 | +[source,terminal] |
| 67 | +---- |
| 68 | +$ oc --kubeconfig <hosted_cluster_name>.kubeconfig get nodes |
| 69 | +---- |
| 70 | + |
| 71 | +. . Collect the must-gather information by entering the following command: |
| 72 | ++ |
| 73 | +[source,terminal] |
| 74 | +---- |
| 75 | +$ oc adm must-gather |
| 76 | +---- |
0 commit comments