From f932be5eb1a12329e0262126396004b584e52fdd Mon Sep 17 00:00:00 2001 From: Martin Dekov Date: Thu, 16 Oct 2025 12:22:46 +0300 Subject: [PATCH 1/8] Add doc how to check harvester status Adding documentation on how to check the status of the harvester components to the troublshooting/installation section. The documentation is added for 1.7/1.6/1.5/1.4 Signed-off-by: Martin Dekov --- docs/troubleshooting/installation.md | 32 +++++++++++++++++++ .../troubleshooting/installation.md | 32 +++++++++++++++++++ .../troubleshooting/installation.md | 30 +++++++++++++++++ .../troubleshooting/installation.md | 32 +++++++++++++++++++ 4 files changed, 126 insertions(+) diff --git a/docs/troubleshooting/installation.md b/docs/troubleshooting/installation.md index 5393544362..04733fd045 100644 --- a/docs/troubleshooting/installation.md +++ b/docs/troubleshooting/installation.md @@ -106,6 +106,38 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ::: +## Check status of harvester components + +Before checking the status of the harvester components, acquire the kubeconfig following preferrably [the second step in the FAQ](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). + +Once you acquire the kubeconfig run the following commands against the cluster to know its ready state. All `kubectl` commands should return `True` if the component is ready. + +### To check if the Harvester pods are ready +```shell +$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the Harvester webhook pods are ready +```shell +$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the Rancher pods are ready +```shell +$ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the API is ready +```shell +$ curl -fk https:///version +``` + +:::note + +To take the VIP follow the [installation instructions](../install/management-address.md#how-to-get-the-vip-mac-address). + +::: + ## Collecting troubleshooting information Please include the following information in a bug report when reporting a failed installation: diff --git a/versioned_docs/version-v1.4/troubleshooting/installation.md b/versioned_docs/version-v1.4/troubleshooting/installation.md index 5393544362..04733fd045 100644 --- a/versioned_docs/version-v1.4/troubleshooting/installation.md +++ b/versioned_docs/version-v1.4/troubleshooting/installation.md @@ -106,6 +106,38 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ::: +## Check status of harvester components + +Before checking the status of the harvester components, acquire the kubeconfig following preferrably [the second step in the FAQ](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). + +Once you acquire the kubeconfig run the following commands against the cluster to know its ready state. All `kubectl` commands should return `True` if the component is ready. + +### To check if the Harvester pods are ready +```shell +$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the Harvester webhook pods are ready +```shell +$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the Rancher pods are ready +```shell +$ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the API is ready +```shell +$ curl -fk https:///version +``` + +:::note + +To take the VIP follow the [installation instructions](../install/management-address.md#how-to-get-the-vip-mac-address). + +::: + ## Collecting troubleshooting information Please include the following information in a bug report when reporting a failed installation: diff --git a/versioned_docs/version-v1.5/troubleshooting/installation.md b/versioned_docs/version-v1.5/troubleshooting/installation.md index 5393544362..1b29e59f7f 100644 --- a/versioned_docs/version-v1.5/troubleshooting/installation.md +++ b/versioned_docs/version-v1.5/troubleshooting/installation.md @@ -104,6 +104,36 @@ you can run the following command to only display the token's value: $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ``` +## Check status of harvester components + +Before checking the status of the harvester components, acquire the kubeconfig following preferrably [the second step in the FAQ](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). + +Once you acquire the kubeconfig run the following commands against the cluster to know its ready state. All `kubectl` commands should return `True` if the component is ready. + +### To check if the Harvester pods are ready +```shell +$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the Harvester webhook pods are ready +```shell +$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the Rancher pods are ready +```shell +$ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the API is ready +```shell +$ curl -fk https:///version +``` + +:::note + +To take the VIP follow the [installation instructions](../install/management-address.md#how-to-get-the-vip-mac-address). + ::: ## Collecting troubleshooting information diff --git a/versioned_docs/version-v1.6/troubleshooting/installation.md b/versioned_docs/version-v1.6/troubleshooting/installation.md index 5393544362..04733fd045 100644 --- a/versioned_docs/version-v1.6/troubleshooting/installation.md +++ b/versioned_docs/version-v1.6/troubleshooting/installation.md @@ -106,6 +106,38 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ::: +## Check status of harvester components + +Before checking the status of the harvester components, acquire the kubeconfig following preferrably [the second step in the FAQ](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). + +Once you acquire the kubeconfig run the following commands against the cluster to know its ready state. All `kubectl` commands should return `True` if the component is ready. + +### To check if the Harvester pods are ready +```shell +$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the Harvester webhook pods are ready +```shell +$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the Rancher pods are ready +```shell +$ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" +``` + +### To check if the API is ready +```shell +$ curl -fk https:///version +``` + +:::note + +To take the VIP follow the [installation instructions](../install/management-address.md#how-to-get-the-vip-mac-address). + +::: + ## Collecting troubleshooting information Please include the following information in a bug report when reporting a failed installation: From 61d5340cbfaac1cf07db3b45f04dfc4a576d4841 Mon Sep 17 00:00:00 2001 From: Martin Dekov Date: Fri, 17 Oct 2025 15:23:46 +0300 Subject: [PATCH 2/8] Address feedback from Jillian Addressing feedback from Jillian: * Replace subtitles with dashes * Fix identation of nodes * Remove references to FAQ section * Fix by suggested wording Signed-off-by: Martin Dekov --- docs/troubleshooting/installation.md | 52 +++++++++++-------- .../troubleshooting/installation.md | 52 +++++++++++-------- .../troubleshooting/installation.md | 52 +++++++++++-------- .../troubleshooting/installation.md | 52 +++++++++++-------- 4 files changed, 120 insertions(+), 88 deletions(-) diff --git a/docs/troubleshooting/installation.md b/docs/troubleshooting/installation.md index 04733fd045..32f03b384c 100644 --- a/docs/troubleshooting/installation.md +++ b/docs/troubleshooting/installation.md @@ -106,37 +106,45 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ::: -## Check status of harvester components +## Check the status of Harvester components -Before checking the status of the harvester components, acquire the kubeconfig following preferrably [the second step in the FAQ](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file using either of the following methods: -Once you acquire the kubeconfig run the following commands against the cluster to know its ready state. All `kubectl` commands should return `True` if the component is ready. +- On the Harvester UI, go to the **Harvester Support** screen and then click **Download KubeConfig**. -### To check if the Harvester pods are ready -```shell -$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +- Run the following commands on any of the management nodes: + ```shell + $ sudo su + $ cat /etc/rancher/rke2/rke2.yaml + ``` -### To check if the Harvester webhook pods are ready -```shell -$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +After you obtain a copy of the kubeconfig file, run the following commands against the cluster to check the readiness of each component. A return value of `True` indicates that the component is ready. -### To check if the Rancher pods are ready -```shell -$ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +- Harvester pods + ```shell + $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` + +- Harvester webhook pods + ```shell + $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` -### To check if the API is ready -```shell -$ curl -fk https:///version -``` +- Rancher pods + ```shell + $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` -:::note +- API + ```shell + $ curl -fk https:///version + ``` -To take the VIP follow the [installation instructions](../install/management-address.md#how-to-get-the-vip-mac-address). + :::note -::: + You must replace with the [VIP MAC address](../install/management-address.md#how-to-get-the-vip-mac-address). + + ::: ## Collecting troubleshooting information diff --git a/versioned_docs/version-v1.4/troubleshooting/installation.md b/versioned_docs/version-v1.4/troubleshooting/installation.md index 04733fd045..32f03b384c 100644 --- a/versioned_docs/version-v1.4/troubleshooting/installation.md +++ b/versioned_docs/version-v1.4/troubleshooting/installation.md @@ -106,37 +106,45 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ::: -## Check status of harvester components +## Check the status of Harvester components -Before checking the status of the harvester components, acquire the kubeconfig following preferrably [the second step in the FAQ](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file using either of the following methods: -Once you acquire the kubeconfig run the following commands against the cluster to know its ready state. All `kubectl` commands should return `True` if the component is ready. +- On the Harvester UI, go to the **Harvester Support** screen and then click **Download KubeConfig**. -### To check if the Harvester pods are ready -```shell -$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +- Run the following commands on any of the management nodes: + ```shell + $ sudo su + $ cat /etc/rancher/rke2/rke2.yaml + ``` -### To check if the Harvester webhook pods are ready -```shell -$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +After you obtain a copy of the kubeconfig file, run the following commands against the cluster to check the readiness of each component. A return value of `True` indicates that the component is ready. -### To check if the Rancher pods are ready -```shell -$ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +- Harvester pods + ```shell + $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` + +- Harvester webhook pods + ```shell + $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` -### To check if the API is ready -```shell -$ curl -fk https:///version -``` +- Rancher pods + ```shell + $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` -:::note +- API + ```shell + $ curl -fk https:///version + ``` -To take the VIP follow the [installation instructions](../install/management-address.md#how-to-get-the-vip-mac-address). + :::note -::: + You must replace with the [VIP MAC address](../install/management-address.md#how-to-get-the-vip-mac-address). + + ::: ## Collecting troubleshooting information diff --git a/versioned_docs/version-v1.5/troubleshooting/installation.md b/versioned_docs/version-v1.5/troubleshooting/installation.md index 1b29e59f7f..387a4bc12e 100644 --- a/versioned_docs/version-v1.5/troubleshooting/installation.md +++ b/versioned_docs/version-v1.5/troubleshooting/installation.md @@ -104,37 +104,45 @@ you can run the following command to only display the token's value: $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ``` -## Check status of harvester components +## Check the status of Harvester components -Before checking the status of the harvester components, acquire the kubeconfig following preferrably [the second step in the FAQ](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file using either of the following methods: -Once you acquire the kubeconfig run the following commands against the cluster to know its ready state. All `kubectl` commands should return `True` if the component is ready. +- On the Harvester UI, go to the **Harvester Support** screen and then click **Download KubeConfig**. -### To check if the Harvester pods are ready -```shell -$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +- Run the following commands on any of the management nodes: + ```shell + $ sudo su + $ cat /etc/rancher/rke2/rke2.yaml + ``` -### To check if the Harvester webhook pods are ready -```shell -$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +After you obtain a copy of the kubeconfig file, run the following commands against the cluster to check the readiness of each component. A return value of `True` indicates that the component is ready. -### To check if the Rancher pods are ready -```shell -$ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +- Harvester pods + ```shell + $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` + +- Harvester webhook pods + ```shell + $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` -### To check if the API is ready -```shell -$ curl -fk https:///version -``` +- Rancher pods + ```shell + $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` -:::note +- API + ```shell + $ curl -fk https:///version + ``` + + :::note -To take the VIP follow the [installation instructions](../install/management-address.md#how-to-get-the-vip-mac-address). + You must replace with the [VIP MAC address](../install/management-address.md#how-to-get-the-vip-mac-address). -::: + ::: ## Collecting troubleshooting information diff --git a/versioned_docs/version-v1.6/troubleshooting/installation.md b/versioned_docs/version-v1.6/troubleshooting/installation.md index 04733fd045..32f03b384c 100644 --- a/versioned_docs/version-v1.6/troubleshooting/installation.md +++ b/versioned_docs/version-v1.6/troubleshooting/installation.md @@ -106,37 +106,45 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ::: -## Check status of harvester components +## Check the status of Harvester components -Before checking the status of the harvester components, acquire the kubeconfig following preferrably [the second step in the FAQ](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file using either of the following methods: -Once you acquire the kubeconfig run the following commands against the cluster to know its ready state. All `kubectl` commands should return `True` if the component is ready. +- On the Harvester UI, go to the **Harvester Support** screen and then click **Download KubeConfig**. -### To check if the Harvester pods are ready -```shell -$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +- Run the following commands on any of the management nodes: + ```shell + $ sudo su + $ cat /etc/rancher/rke2/rke2.yaml + ``` -### To check if the Harvester webhook pods are ready -```shell -$ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +After you obtain a copy of the kubeconfig file, run the following commands against the cluster to check the readiness of each component. A return value of `True` indicates that the component is ready. -### To check if the Rancher pods are ready -```shell -$ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" -``` +- Harvester pods + ```shell + $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` + +- Harvester webhook pods + ```shell + $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` -### To check if the API is ready -```shell -$ curl -fk https:///version -``` +- Rancher pods + ```shell + $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + ``` -:::note +- API + ```shell + $ curl -fk https:///version + ``` -To take the VIP follow the [installation instructions](../install/management-address.md#how-to-get-the-vip-mac-address). + :::note -::: + You must replace with the [VIP MAC address](../install/management-address.md#how-to-get-the-vip-mac-address). + + ::: ## Collecting troubleshooting information From c39cfb2fedb4b189f39e06ab3851b786c5360c8c Mon Sep 17 00:00:00 2001 From: Martin Dekov Date: Tue, 21 Oct 2025 15:33:50 +0300 Subject: [PATCH 3/8] Address feedback Addressing feedback from Jian and Ivan including the following: * kubeconfig command merged into one line command * multiple kubectl commands replaced with single bash script for readiness * the VIP note elaborates what is the actual VIP among the values in the referenced link Signed-off-by: Martin Dekov --- docs/troubleshooting/installation.md | 57 +++++++++++-------- .../troubleshooting/installation.md | 57 +++++++++++-------- .../troubleshooting/installation.md | 57 +++++++++++-------- .../troubleshooting/installation.md | 57 +++++++++++-------- 4 files changed, 132 insertions(+), 96 deletions(-) diff --git a/docs/troubleshooting/installation.md b/docs/troubleshooting/installation.md index 32f03b384c..662f949589 100644 --- a/docs/troubleshooting/installation.md +++ b/docs/troubleshooting/installation.md @@ -108,31 +108,40 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ## Check the status of Harvester components -Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file using either of the following methods: - -- On the Harvester UI, go to the **Harvester Support** screen and then click **Download KubeConfig**. - -- Run the following commands on any of the management nodes: - ```shell - $ sudo su - $ cat /etc/rancher/rke2/rke2.yaml - ``` - -After you obtain a copy of the kubeconfig file, run the following commands against the cluster to check the readiness of each component. A return value of `True` indicates that the component is ready. +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file through `ssh` on any of the management nodes: +```shell +$ sudo -i cat /etc/rancher/rke2/rke2.yaml +``` -- Harvester pods - ```shell - $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" - ``` - -- Harvester webhook pods - ```shell - $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" - ``` +After you obtain a copy of the kubeconfig file, run the following script against the cluster to check the readiness of each component. -- Rancher pods +- Harvester components script ```shell - $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + #!/bin/bash + + cluster_ready() { + namespaces=("cattle-system" "kube-system" "harvester-system" "longhorn-system") + for ns in "${namespaces[@]}"; do + pod_statuses=($(kubectl -n "${ns}" get pods \ + --field-selector=status.phase!=Succeeded \ + -ojsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name},{.status.conditions[?(@.type=="Ready")].status}{"\n"}{end}')) + for status in "${pod_statuses[@]}"; do + name=$(echo "${status}" | cut -d ',' -f1) + ready=$(echo "${status}" | cut -d ',' -f2) + if [ "${ready}" != "True" ]; then + echo "pod ${name} is not ready" + false + return + fi + done + done + } + + if cluster_ready; then + echo "cluster is ready" + else + echo "cluster is not ready" + fi ``` - API @@ -141,8 +150,8 @@ After you obtain a copy of the kubeconfig file, run the following commands again ``` :::note - - You must replace with the [VIP MAC address](../install/management-address.md#how-to-get-the-vip-mac-address). + + You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address) which is the value of `kube-vip.io/requestedIP` in the link. ::: diff --git a/versioned_docs/version-v1.4/troubleshooting/installation.md b/versioned_docs/version-v1.4/troubleshooting/installation.md index 32f03b384c..662f949589 100644 --- a/versioned_docs/version-v1.4/troubleshooting/installation.md +++ b/versioned_docs/version-v1.4/troubleshooting/installation.md @@ -108,31 +108,40 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ## Check the status of Harvester components -Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file using either of the following methods: - -- On the Harvester UI, go to the **Harvester Support** screen and then click **Download KubeConfig**. - -- Run the following commands on any of the management nodes: - ```shell - $ sudo su - $ cat /etc/rancher/rke2/rke2.yaml - ``` - -After you obtain a copy of the kubeconfig file, run the following commands against the cluster to check the readiness of each component. A return value of `True` indicates that the component is ready. +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file through `ssh` on any of the management nodes: +```shell +$ sudo -i cat /etc/rancher/rke2/rke2.yaml +``` -- Harvester pods - ```shell - $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" - ``` - -- Harvester webhook pods - ```shell - $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" - ``` +After you obtain a copy of the kubeconfig file, run the following script against the cluster to check the readiness of each component. -- Rancher pods +- Harvester components script ```shell - $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + #!/bin/bash + + cluster_ready() { + namespaces=("cattle-system" "kube-system" "harvester-system" "longhorn-system") + for ns in "${namespaces[@]}"; do + pod_statuses=($(kubectl -n "${ns}" get pods \ + --field-selector=status.phase!=Succeeded \ + -ojsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name},{.status.conditions[?(@.type=="Ready")].status}{"\n"}{end}')) + for status in "${pod_statuses[@]}"; do + name=$(echo "${status}" | cut -d ',' -f1) + ready=$(echo "${status}" | cut -d ',' -f2) + if [ "${ready}" != "True" ]; then + echo "pod ${name} is not ready" + false + return + fi + done + done + } + + if cluster_ready; then + echo "cluster is ready" + else + echo "cluster is not ready" + fi ``` - API @@ -141,8 +150,8 @@ After you obtain a copy of the kubeconfig file, run the following commands again ``` :::note - - You must replace with the [VIP MAC address](../install/management-address.md#how-to-get-the-vip-mac-address). + + You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address) which is the value of `kube-vip.io/requestedIP` in the link. ::: diff --git a/versioned_docs/version-v1.5/troubleshooting/installation.md b/versioned_docs/version-v1.5/troubleshooting/installation.md index 387a4bc12e..6ea9d991d7 100644 --- a/versioned_docs/version-v1.5/troubleshooting/installation.md +++ b/versioned_docs/version-v1.5/troubleshooting/installation.md @@ -106,31 +106,40 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ## Check the status of Harvester components -Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file using either of the following methods: - -- On the Harvester UI, go to the **Harvester Support** screen and then click **Download KubeConfig**. - -- Run the following commands on any of the management nodes: - ```shell - $ sudo su - $ cat /etc/rancher/rke2/rke2.yaml - ``` - -After you obtain a copy of the kubeconfig file, run the following commands against the cluster to check the readiness of each component. A return value of `True` indicates that the component is ready. +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file through `ssh` on any of the management nodes: +```shell +$ sudo -i cat /etc/rancher/rke2/rke2.yaml +``` -- Harvester pods - ```shell - $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" - ``` - -- Harvester webhook pods - ```shell - $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" - ``` +After you obtain a copy of the kubeconfig file, run the following script against the cluster to check the readiness of each component. -- Rancher pods +- Harvester components script ```shell - $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + #!/bin/bash + + cluster_ready() { + namespaces=("cattle-system" "kube-system" "harvester-system" "longhorn-system") + for ns in "${namespaces[@]}"; do + pod_statuses=($(kubectl -n "${ns}" get pods \ + --field-selector=status.phase!=Succeeded \ + -ojsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name},{.status.conditions[?(@.type=="Ready")].status}{"\n"}{end}')) + for status in "${pod_statuses[@]}"; do + name=$(echo "${status}" | cut -d ',' -f1) + ready=$(echo "${status}" | cut -d ',' -f2) + if [ "${ready}" != "True" ]; then + echo "pod ${name} is not ready" + false + return + fi + done + done + } + + if cluster_ready; then + echo "cluster is ready" + else + echo "cluster is not ready" + fi ``` - API @@ -139,8 +148,8 @@ After you obtain a copy of the kubeconfig file, run the following commands again ``` :::note - - You must replace with the [VIP MAC address](../install/management-address.md#how-to-get-the-vip-mac-address). + + You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address) which is the value of `kube-vip.io/requestedIP` in the link. ::: diff --git a/versioned_docs/version-v1.6/troubleshooting/installation.md b/versioned_docs/version-v1.6/troubleshooting/installation.md index 32f03b384c..662f949589 100644 --- a/versioned_docs/version-v1.6/troubleshooting/installation.md +++ b/versioned_docs/version-v1.6/troubleshooting/installation.md @@ -108,31 +108,40 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ## Check the status of Harvester components -Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file using either of the following methods: - -- On the Harvester UI, go to the **Harvester Support** screen and then click **Download KubeConfig**. - -- Run the following commands on any of the management nodes: - ```shell - $ sudo su - $ cat /etc/rancher/rke2/rke2.yaml - ``` - -After you obtain a copy of the kubeconfig file, run the following commands against the cluster to check the readiness of each component. A return value of `True` indicates that the component is ready. +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file through `ssh` on any of the management nodes: +```shell +$ sudo -i cat /etc/rancher/rke2/rke2.yaml +``` -- Harvester pods - ```shell - $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=apiserver --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" - ``` - -- Harvester webhook pods - ```shell - $ kubectl -n harvester-system get pods -l app.kubernetes.io/name=harvester -l app.kubernetes.io/component=webhook-server --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" - ``` +After you obtain a copy of the kubeconfig file, run the following script against the cluster to check the readiness of each component. -- Rancher pods +- Harvester components script ```shell - $ kubectl -n cattle-system get pods -l app=rancher --no-headers -o custom-columns="STATUS:status.conditions[?(@.type=='Ready')].status" + #!/bin/bash + + cluster_ready() { + namespaces=("cattle-system" "kube-system" "harvester-system" "longhorn-system") + for ns in "${namespaces[@]}"; do + pod_statuses=($(kubectl -n "${ns}" get pods \ + --field-selector=status.phase!=Succeeded \ + -ojsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name},{.status.conditions[?(@.type=="Ready")].status}{"\n"}{end}')) + for status in "${pod_statuses[@]}"; do + name=$(echo "${status}" | cut -d ',' -f1) + ready=$(echo "${status}" | cut -d ',' -f2) + if [ "${ready}" != "True" ]; then + echo "pod ${name} is not ready" + false + return + fi + done + done + } + + if cluster_ready; then + echo "cluster is ready" + else + echo "cluster is not ready" + fi ``` - API @@ -141,8 +150,8 @@ After you obtain a copy of the kubeconfig file, run the following commands again ``` :::note - - You must replace with the [VIP MAC address](../install/management-address.md#how-to-get-the-vip-mac-address). + + You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address) which is the value of `kube-vip.io/requestedIP` in the link. ::: From b7a8665aa8814924eb3e60231145f063a9e2ef65 Mon Sep 17 00:00:00 2001 From: Martin Dekov Date: Wed, 22 Oct 2025 11:01:34 +0300 Subject: [PATCH 4/8] Revert to referencing kubectl section Revert references to point to the FAQ section on how to take the kubeconfig of harvester. Discussing how to explain it made me think that the new section should be focused on how to check the cluster state, not how to get kubeconfig as we already have such section. In case we change the place of the section or the contents we need to only fix the reference, and it would be easier that way as opposed to finding where we explained how kubeconfig can be taken so we fix explanation with reference. Signed-off-by: Martin Dekov --- docs/troubleshooting/installation.md | 5 +---- versioned_docs/version-v1.4/troubleshooting/installation.md | 5 +---- versioned_docs/version-v1.5/troubleshooting/installation.md | 5 +---- versioned_docs/version-v1.6/troubleshooting/installation.md | 5 +---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/docs/troubleshooting/installation.md b/docs/troubleshooting/installation.md index 662f949589..914c19c763 100644 --- a/docs/troubleshooting/installation.md +++ b/docs/troubleshooting/installation.md @@ -108,10 +108,7 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ## Check the status of Harvester components -Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file through `ssh` on any of the management nodes: -```shell -$ sudo -i cat /etc/rancher/rke2/rke2.yaml -``` +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file following the [guide](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). After you obtain a copy of the kubeconfig file, run the following script against the cluster to check the readiness of each component. diff --git a/versioned_docs/version-v1.4/troubleshooting/installation.md b/versioned_docs/version-v1.4/troubleshooting/installation.md index 662f949589..914c19c763 100644 --- a/versioned_docs/version-v1.4/troubleshooting/installation.md +++ b/versioned_docs/version-v1.4/troubleshooting/installation.md @@ -108,10 +108,7 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ## Check the status of Harvester components -Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file through `ssh` on any of the management nodes: -```shell -$ sudo -i cat /etc/rancher/rke2/rke2.yaml -``` +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file following the [guide](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). After you obtain a copy of the kubeconfig file, run the following script against the cluster to check the readiness of each component. diff --git a/versioned_docs/version-v1.5/troubleshooting/installation.md b/versioned_docs/version-v1.5/troubleshooting/installation.md index 6ea9d991d7..a9263de207 100644 --- a/versioned_docs/version-v1.5/troubleshooting/installation.md +++ b/versioned_docs/version-v1.5/troubleshooting/installation.md @@ -106,10 +106,7 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ## Check the status of Harvester components -Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file through `ssh` on any of the management nodes: -```shell -$ sudo -i cat /etc/rancher/rke2/rke2.yaml -``` +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file following the [guide](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). After you obtain a copy of the kubeconfig file, run the following script against the cluster to check the readiness of each component. diff --git a/versioned_docs/version-v1.6/troubleshooting/installation.md b/versioned_docs/version-v1.6/troubleshooting/installation.md index 662f949589..914c19c763 100644 --- a/versioned_docs/version-v1.6/troubleshooting/installation.md +++ b/versioned_docs/version-v1.6/troubleshooting/installation.md @@ -108,10 +108,7 @@ $ sudo yq eval .token /etc/rancher/rancherd/config.yaml ## Check the status of Harvester components -Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file through `ssh` on any of the management nodes: -```shell -$ sudo -i cat /etc/rancher/rke2/rke2.yaml -``` +Before checking the status of Harvester components, obtain a copy of the Harvester cluster's kubeconfig file following the [guide](../faq.md#how-can-i-access-the-kubeconfig-file-of-the-harvester-cluster). After you obtain a copy of the kubeconfig file, run the following script against the cluster to check the readiness of each component. From cd0a3047444e7da6b3aca61847a8150fce301f5f Mon Sep 17 00:00:00 2001 From: Martin Dekov Date: Fri, 24 Oct 2025 12:12:44 +0300 Subject: [PATCH 5/8] Update docs/troubleshooting/installation.md Co-authored-by: Daria Vladykina Signed-off-by: Martin Dekov --- docs/troubleshooting/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/troubleshooting/installation.md b/docs/troubleshooting/installation.md index 914c19c763..3ae143050e 100644 --- a/docs/troubleshooting/installation.md +++ b/docs/troubleshooting/installation.md @@ -148,7 +148,7 @@ After you obtain a copy of the kubeconfig file, run the following script against :::note - You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address) which is the value of `kube-vip.io/requestedIP` in the link. + You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link. ::: From 978cc345f8b44d0527c12476aa009f7d5b0bccbe Mon Sep 17 00:00:00 2001 From: Martin Dekov Date: Fri, 24 Oct 2025 12:12:58 +0300 Subject: [PATCH 6/8] Update versioned_docs/version-v1.6/troubleshooting/installation.md Co-authored-by: Daria Vladykina Signed-off-by: Martin Dekov --- versioned_docs/version-v1.6/troubleshooting/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioned_docs/version-v1.6/troubleshooting/installation.md b/versioned_docs/version-v1.6/troubleshooting/installation.md index 914c19c763..3ae143050e 100644 --- a/versioned_docs/version-v1.6/troubleshooting/installation.md +++ b/versioned_docs/version-v1.6/troubleshooting/installation.md @@ -148,7 +148,7 @@ After you obtain a copy of the kubeconfig file, run the following script against :::note - You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address) which is the value of `kube-vip.io/requestedIP` in the link. + You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link. ::: From 91cd748507f557ef98930c59e1e8f7da1362e3df Mon Sep 17 00:00:00 2001 From: Martin Dekov Date: Fri, 24 Oct 2025 12:13:05 +0300 Subject: [PATCH 7/8] Update versioned_docs/version-v1.4/troubleshooting/installation.md Co-authored-by: Daria Vladykina Signed-off-by: Martin Dekov --- versioned_docs/version-v1.4/troubleshooting/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioned_docs/version-v1.4/troubleshooting/installation.md b/versioned_docs/version-v1.4/troubleshooting/installation.md index 914c19c763..3ae143050e 100644 --- a/versioned_docs/version-v1.4/troubleshooting/installation.md +++ b/versioned_docs/version-v1.4/troubleshooting/installation.md @@ -148,7 +148,7 @@ After you obtain a copy of the kubeconfig file, run the following script against :::note - You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address) which is the value of `kube-vip.io/requestedIP` in the link. + You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link. ::: From 8dbe0f1b747c5924e3bc088d7f4f7b2545c14a9b Mon Sep 17 00:00:00 2001 From: Martin Dekov Date: Fri, 24 Oct 2025 12:13:13 +0300 Subject: [PATCH 8/8] Update versioned_docs/version-v1.5/troubleshooting/installation.md Co-authored-by: Daria Vladykina Signed-off-by: Martin Dekov --- versioned_docs/version-v1.5/troubleshooting/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioned_docs/version-v1.5/troubleshooting/installation.md b/versioned_docs/version-v1.5/troubleshooting/installation.md index a9263de207..7f6732dd18 100644 --- a/versioned_docs/version-v1.5/troubleshooting/installation.md +++ b/versioned_docs/version-v1.5/troubleshooting/installation.md @@ -146,7 +146,7 @@ After you obtain a copy of the kubeconfig file, run the following script against :::note - You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address) which is the value of `kube-vip.io/requestedIP` in the link. + You must replace with the [real VIP](../install/management-address.md#how-to-get-the-vip-mac-address), which is the value of `kube-vip.io/requestedIP` in the link. :::