Skip to content
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

Add support debug info script #1500

Merged
merged 2 commits into from
Oct 14, 2024
Merged

Add support debug info script #1500

merged 2 commits into from
Oct 14, 2024

Conversation

jvoravong
Copy link
Contributor

@jvoravong jvoravong commented Oct 11, 2024

This PR adds a bash script to collect useful debug information in a Kubernetes cluster in a standardized manner.

  • A bash script is used instead of Go code to avoid dependency updates and related conflicts when collecting debug information.
  • This addition will expedite identifying error users are facing in a systematic manner.

Once this PR is merged, this PR can be run like such.

Via Terminal and Curl:

curl -s https://raw.githubusercontent.com/signalfx/splunk-otel-collector-chart/main/tools/splunk_kubernetes_debug_info.sh | bash

Via Terminal and Local File:

./splunk_kubernetes_debug_info.sh [NAMESPACES=namespace1,namespace2,...] [K8S_OBJECT_NAME_FILTER=splunk|collector|otel|certmanager|test|sck|sock|customname]

The output zip file will contain content with a tree structure similar to this.

jvoravong% tree
.
├── cluster.txt
├── cluster_cert_manager_objects.yaml
├── cluster_custom_resource_definitions.yaml
├── cluster_webhooks.yaml
├── errors.txt
...
├── namespace_kube-public_roles_system:controller:bootstrap-signer.yaml
├── namespace_kube-system_daemonsets_kube-proxy.yaml
├── namespace_kube-system_deployments_coredns.yaml
├── namespace_kube-system_endpoints_k8s.io-minikube-hostpath.yaml
├── namespace_kube-system_endpoints_kube-dns.yaml
├── namespace_kube-system_rolebindings_cert-manager-cainjector:leaderelection.yaml
├── namespace_kube-system_rolebindings_cert-manager:leaderelection.yaml
├── namespace_kube-system_rolebindings_kube-proxy.yaml
├── namespace_kube-system_rolebindings_kubeadm:kubelet-config.yaml
├── namespace_kube-system_rolebindings_kubeadm:nodes-kubeadm-config.yaml
├── namespace_kube-system_rolebindings_system::extension-apiserver-authentication-reader.yaml
├── namespace_kube-system_rolebindings_system::leader-locking-kube-controller-manager.yaml
├── namespace_kube-system_rolebindings_system::leader-locking-kube-scheduler.yaml
├── namespace_kube-system_rolebindings_system:controller:bootstrap-signer.yaml
├── namespace_kube-system_rolebindings_system:controller:cloud-provider.yaml
├── namespace_kube-system_rolebindings_system:controller:token-cleaner.yaml
├── namespace_kube-system_rolebindings_system:persistent-volume-provisioner.yaml
├── namespace_kube-system_roles_cert-manager-cainjector:leaderelection.yaml
├── namespace_kube-system_roles_cert-manager:leaderelection.yaml
├── namespace_kube-system_roles_extension-apiserver-authentication-reader.yaml
├── namespace_kube-system_roles_kube-proxy.yaml
├── namespace_kube-system_roles_kubeadm:kubelet-config.yaml
├── namespace_kube-system_roles_kubeadm:nodes-kubeadm-config.yaml
├── namespace_kube-system_roles_system::leader-locking-kube-controller-manager.yaml
├── namespace_kube-system_roles_system::leader-locking-kube-scheduler.yaml
├── namespace_kube-system_roles_system:controller:bootstrap-signer.yaml
├── namespace_kube-system_roles_system:controller:cloud-provider.yaml
├── namespace_kube-system_roles_system:controller:token-cleaner.yaml
├── namespace_kube-system_roles_system:persistent-volume-provisioner.yaml
├── namespace_kube-system_svc_kube-dns.yaml
├── namespace_monitoring_configmaps_splunk-otel-collector-otel-agent.yaml
├── namespace_monitoring_configmaps_splunk-otel-collector-otel-k8s-cluster-receiver.yaml
├── namespace_monitoring_daemonsets_splunk-otel-collector-agent.yaml
├── namespace_monitoring_deployments_splunk-otel-collector-k8s-cluster-receiver.yaml
├── namespace_monitoring_deployments_splunk-otel-collector-operator.yaml
├── namespace_monitoring_endpoints_splunk-otel-collector-operator-webhook.yaml
├── namespace_monitoring_endpoints_splunk-otel-collector-operator.yaml
├── namespace_monitoring_logs_pod_splunk-otel-collector-agent-9cb9f.log
├── namespace_monitoring_logs_pod_splunk-otel-collector-k8s-cluster-receiver-5f64d44f9c-fksjt.log
├── namespace_monitoring_logs_pod_splunk-otel-collector-operator-f696c4467-qnlkn.log
├── namespace_monitoring_otelinst_splunk-otel-collector.yaml
├── namespace_monitoring_rolebindings_splunk-otel-collector-operator-leader-election.yaml
├── namespace_monitoring_roles_splunk-otel-collector-operator-leader-election.yaml
├── namespace_monitoring_secrets_sh.helm.release.v1.splunk-otel-collector.v1.yaml
├── namespace_monitoring_secrets_splunk-otel-collector-operator-controller-manager-service-cert.yaml
├── namespace_monitoring_secrets_splunk-otel-collector.yaml
├── namespace_monitoring_svc_splunk-otel-collector-operator-webhook.yaml
└── namespace_monitoring_svc_splunk-otel-collector-operator.yaml

@jvoravong jvoravong requested review from a team as code owners October 11, 2024 18:26
Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's get it in and try it out against our clusters.

@jvoravong jvoravong merged commit 397a782 into main Oct 14, 2024
57 checks passed
@jvoravong jvoravong deleted the debug-info branch October 14, 2024 17:19
@github-actions github-actions bot locked and limited conversation to collaborators Oct 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants