Skip to content

feat(cli): Added a command to collect Kubeslice components logs#100

Open
AyushSriv06 wants to merge 1 commit intokubeslice:masterfrom
AyushSriv06:components-logs
Open

feat(cli): Added a command to collect Kubeslice components logs#100
AyushSriv06 wants to merge 1 commit intokubeslice:masterfrom
AyushSriv06:components-logs

Conversation

@AyushSriv06
Copy link

fix: #71
Add collect-info command for KubeSlice debug information collection

Summary
Implements kubeslice-cli collect-info command to gather comprehensive debug information
from KubeSlice components in Kubernetes clusters.

Changes

  • Added cmd/collect-info.go - Main command implementation with Cobra framework
  • Added pkg/collect-info.go - Orchestrates collection of debug information
  • Added pkg/internal/collect-info.go - Core collection logic and kubectl operations
  • Supports collection from: controller, worker, manager, calico, prometheus, resources
  • Configurable collection types: logs, configs, events, metrics
  • Outputs compressed .tgz archive for easy sharing and analysis

Testing
Tested on GKE cluster with KubeSlice 1.4.0 - Successfully collected debug info from
various components, handled error scenarios, and generated proper archive files. All
collection modes (logs, configs, events) working correctly with proper error handling.

Usage
kubeslice-cli collect-info -n kubeslice-demo --out debug-info.tgz
kubeslice-cli collect-info -n kubeslice-demo --components controller,worker --logs

Signed-off-by: Ayush Srivastava <ayushsrisks@gmail.com>
@pnavali
Copy link

pnavali commented Aug 20, 2025

@gourishkb @bharath-avesha please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add a command to collect Kubeslice components logs

2 participants