Skip to content

The Rancher v2.x systems summary script

Article Number: 000020192

Environment

Rancher v2.x local cluster (Kubernetes cluster hosting the Rancher management server)

Situation

Understanding your cluster and node distribution on an ongoing basis helps Rancher Support send prescriptive advisories on scale, performance, and stability. System information needs to be extracted from the Rancher server environment for this analysis.

Cause

Rancher Support utilises this lightweight script to safely aggregate non-sensitive high-level metrics regarding cluster topology, counts, and resource distributions. This data helps proactively identify potential bottleneck risks or configurations that deviate from scale best practices.

Resolution

System information can be collected from a Rancher v2.x server node using the Rancher v2.x systems summary script v2.

Deploy the summary collection pod from a host configured with a valid kubeconfig pointing to the Rancher local cluster. Run the following commands to deploy the pod, retrieve the data, and clean up the environment:

  1. Deploy the data collection pod in the cluster:

kubectl apply -f https://raw.githubusercontent.com/rancherlabs/support-tools/master/collection/rancher/v2.x/systems-information-v2/deploy.yaml
2. Wait for the pod to execute and reach a Succeeded status:

while [[ $(kubectl get pod rancher-systems-summary-pod -n cattle-system -o 'jsonpath={..status.phase}') != "Succeeded" ]]; do
  echo "Waiting for rancher-systems-summary-pod to complete..."
  sleep 5
done
3. Retrieve the collected system summary logs:

kubectl logs pod/rancher-systems-summary-pod -n cattle-system
4. Clean up the pod deployment from the cluster:

kubectl delete pod/rancher-systems-summary-pod -n cattle-system