diff --git a/hosted_control_planes/hcp-troubleshooting.adoc b/hosted_control_planes/hcp-troubleshooting.adoc index c5db9e287070..64f7e032173a 100644 --- a/hosted_control_planes/hcp-troubleshooting.adoc +++ b/hosted_control_planes/hcp-troubleshooting.adoc @@ -12,14 +12,20 @@ include::modules/hosted-control-planes-troubleshooting.adoc[leveloffset=+1] [role="_additional-resources"] .Additional resources - * xref:../hosted_control_planes/hcp-prepare/hcp-cli.adoc[Installing the {hcp} command-line interface] +[id="hcp-must-gather-day-2"] +== Gathering {product-title} data for a hosted cluster + +You can gather {product-title} debugging information for a hosted cluster by using the {mce-short} web console or by using the CLI. + +include::modules/hcp-must-gather-cli.adoc[leveloffset=+2] +include::modules/hcp-must-gather-console.adoc[leveloffset=+2] + include::modules/hcp-must-gather-dc.adoc[leveloffset=+1] [role="_additional-resources"] .Additional resources - * link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#install-on-disconnected-networks[Install on disconnected networks] [id="hcp-ts-ocp-virt"] @@ -32,7 +38,6 @@ include::modules/hcp-ts-no-nodes-reg.adoc[leveloffset=+2] [role="_additional-resources"] .Additional resources - * link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#identifying-vm-console-logs[Identifying the problem: Access the VM console logs] include::modules/hcp-ts-nodes-stuck.adoc[leveloffset=+2] @@ -45,7 +50,6 @@ include::modules/hcp-ts-non-bm.adoc[leveloffset=+2] [role="_additional-resources"] .Additional resources - * link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html/clusters/cluster_mce_overview#remove-managed-cluster[Removing a cluster from management] [id="hcp-ts-bm"] @@ -57,7 +61,6 @@ include::modules/hcp-ts-bm-nodes-not-added.adoc[leveloffset=+2] [role="_additional-resources"] .Additional resources - * link:https://docs.redhat.com/en/documentation/red_hat_advanced_cluster_management_for_kubernetes/2.13/html-single/clusters/index#on-prem-creating-your-cluster-with-the-cli-pull-secret[Add the pull secret to the namespace] include::modules/hosted-restart-hcp-components.adoc[leveloffset=+1] diff --git a/modules/hcp-must-gather-cli.adoc b/modules/hcp-must-gather-cli.adoc new file mode 100644 index 000000000000..917569d0b900 --- /dev/null +++ b/modules/hcp-must-gather-cli.adoc @@ -0,0 +1,45 @@ +// Module included in the following assemblies: +// +// * hosted_control_planes/hcp-troubleshooting.adoc + +:_mod-docs-content-type: PROCEDURE +[id="hcp-must-gather-cli_{context}"] += Gathering data for a hosted cluster by using the CLI + +You can gather {product-title} debugging information for a hosted cluster by using the CLI. + +.Prerequisites + +* You must have `cluster-admin` access to the management cluster. + +* You need the `name` value for the `HostedCluster` resource and the namespace where the CR is deployed. + +* You must have the `hcp` command-line interface installed. For more information, see "Installing the {hcp} command-line interface". + +* You must have the OpenShift CLI (`oc`) installed. + +* You must ensure that the `kubeconfig` file is loaded and is pointing to the management cluster. + +.Procedure + +. Generate the `kubeconfig` file by entering the following command: ++ +[source,terminal] +---- +$ hcp create kubeconfig --namespace \ + --name > .kubeconfig +---- + +. After you save the `kubeconfig` file, you can access the hosted cluster by entering the following example command: ++ +[source,terminal] +---- +$ oc --kubeconfig .kubeconfig get nodes +---- + +. . Collect the must-gather information by entering the following command: ++ +[source,terminal] +---- +$ oc adm must-gather +---- \ No newline at end of file diff --git a/modules/hcp-must-gather-console.adoc b/modules/hcp-must-gather-console.adoc new file mode 100644 index 000000000000..1473a27ba89b --- /dev/null +++ b/modules/hcp-must-gather-console.adoc @@ -0,0 +1,33 @@ +// Module included in the following assemblies: +// +// * hosted_control_planes/hcp-troubleshooting.adoc + +:_mod-docs-content-type: PROCEDURE +[id="hcp-must-gather-console_{context}"] += Gathering data for a hosted cluster by using the web console + +You can gather {product-title} debugging information for a hosted cluster by using the {mce-short} web console. + +.Prerequisites + +* You must have `cluster-admin` access to the management cluster. + +* You need the `name` value for the `HostedCluster` resource and the namespace where the CR is deployed. + +* You must have the `hcp` command-line interface installed. For more information, see "Installing the {hcp} command-line interface". + +* You must have the OpenShift CLI (`oc`) installed. + +* You must ensure that the `kubeconfig` file is loaded and is pointing to the management cluster. + +.Procedure + +. In the web console, select *All Clusters* and select the cluster you want to troubleshoot. +. In the upper-right corner, select *Download kubeconfig*. +. Export the downloaded `kubeconfig` file. +. Collect the must-gather information by entering the following command: ++ +[source,terminal] +---- +$ oc adm must-gather +---- \ No newline at end of file