---
title: Preliminary diagnostic data for Kubernetes troubleshooting
slug: install-10x/preliminary-diagnostic-data-for-kubernetes-troubleshooting
docTags: 
createdAt: 2025-12-15T07:26:11.726Z
---

This document explains how to gather preliminary diagnostic data for troubleshooting Swimlane Platform deployments that include Kubernetes clusters.

To get detailed information about the overall health of your cluster, you can run:

:::BlockQuote
*kubectl cluster-info dump | tee cluster-info.log*
:::

**Nodes:**

1. Check if all the nodes are all registered correctly.

:::BlockQuote{indent="1"}
*kubectl get nodes -o wide | tee nodes.log*
:::

2. Verify that all of the expected nodes are present and that they are all in the Ready state.
3. Describe each node that doesn’t have STATUS equal Ready.

:::BlockQuote{indent="1"}
*kubectl describe node \<name> | tee \<name>-desc.log*
:::

4. Confirm that both the kubelet and docker services are running:

:::BlockQuote{indent="1"}
for SERVICES in containerd kubelet;
&#x20;  do echo --- $SERVICES --- ;
&#x20;  systemctl is-active $SERVICES ;
&#x20;  systemctl is-enabled $SERVICES ;&#x20;
&#x20;  echo ""; &#x20;
done
:::

:::Paragraph{indent="1"}
If either of the services are inactive, capture the last 3 hours of log:
:::

:::BlockQuote{indent="1"}
*journalctl -u \<service-name> --since "3 hour ago" > /tmp/\<service-name>-log.txt*
:::


**Pods:**

Most importantly, collect information about the health of the pods within the cluster.


1. Run to capture all recent events.

:::BlockQuote{indent="1"}
*kubectl get events --field-selector type!=Normal --sort-by='.metadata.creationTimestamp' --all-namespaces > /tmp/k8s-events.log*&#x20;
:::

:::Paragraph{indent="1"}
Note: By default, the amount of time to retain events is 1h.
:::

2. Run  and capture its output.

:::BlockQuote{indent="1"}
*kubectl get pods --all-namespaces -o wide | tee all-pods.log*
:::

3. For each pod that’s shown in the *get pods* output to be in any state other than running/completed:
   1. Run capture its output.

:::BlockQuote{indent="2"}
*kubectl logs -n \<namepsace-name> \<pod-name> > /tmp/\<pod-name>-log.txt&#x20;*
:::

:::Paragraph{listStyleType="decimal" listStart="2" listRestartPolite="2" indent="2"}
Run  capture its output.
:::

:::BlockQuote{indent="2"}
*kubectl describe pod -n \<namespace-name> \<pod-name>* *> /tmp/\<pod-name>-desc.txt*
:::

:::Paragraph{listStyleType="decimal" listStart="3" listRestartPolite="3" indent="2"}
Since the output from these several commands can be voluminous, copy each command's output into a text file and attach these files to your Support Portal ticket.
:::

To minimize the amount of copying and pasting when formulating the above commands, try the following:

:::BlockQuote
\# Save the name of the Swimlane namespace into an environment variable
export ns=replicated-very-long-app-id

kubectl get pods -n $ns
:::

**Support Bundle**

If your Swimlane deployment includes an Admin console/dashboard then follow the steps below to generate and submit a Support Bundle:

1. Visit https\://\<load-balancer-ip>:8800
2. Browse to the Support/Troubleshoot section.
3. Download the Support Bundle to your workstation.
4. Attach the Support Bundle to your Support ticket.



**Troubleshooting kubectl:**

If the first attempt to invoke *kubectl* results in this error, *The connection to the server localhost:8080 was refused…*, then run:

:::BlockQuote
\# Remember to specify the dash when changing user accounts
sudo su -
echo $KUBECONFIG
:::

If the output thereof is empty then:

:::BlockQuote
export KUBECONFIG=/etc/kubernetes/admin.conf
:::

If that works then add this export command to your Linux user profile within the Master nodes so that it’s invoked whenever you begin an SSH session.


Thank you for helping us to gather this diagnostic data!

