Skip to content

[enterprise-4.18] [OSDOCS-13848]: Add must-gather docs for day 2 HCP #91589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions hosted_control_planes/hcp-troubleshooting.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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]
Expand All @@ -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"]
Expand All @@ -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]
Expand Down
45 changes: 45 additions & 0 deletions modules/hcp-must-gather-cli.adoc
Original file line number Diff line number Diff line change
@@ -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 <hosted_cluster_namespace> \
--name <hosted_cluster_name> > <hosted_cluster_name>.kubeconfig
----

. After you save the `kubeconfig` file, you can access the hosted cluster by entering the following example command:
+
[source,terminal]
----
$ oc --kubeconfig <hosted_cluster_name>.kubeconfig get nodes
----

. . Collect the must-gather information by entering the following command:
+
[source,terminal]
----
$ oc adm must-gather
----
33 changes: 33 additions & 0 deletions modules/hcp-must-gather-console.adoc
Original file line number Diff line number Diff line change
@@ -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
----