Show HN: KLogger – Quick CLI to grab all deployment logs from a K8s namespace

github.com

2 points by christensen143 18 hours ago

Had a vendor ask for logs from our Kubernetes cluster today. We don't run any log aggregation (no fluentd/fluentbit) except DataDog, so I needed to grab logs from 30+ deployments across three namespaces.

Instead of running kubectl logs for each deployment manually, I built this Python CLI that collects all deployment logs from a namespace in one shot. It organizes them by date and namespace, runs collections in parallel, and handles the usual k8s edge cases (multiple pods per deployment, failed pods, etc).

Usage is simple: klogger collect -n production

Nothing groundbreaking, but it saved me hours of manual work and might help others in similar situations. It's basically a kubectl wrapper that does one thing well - bulk log collection when you need it.

GitHub: https://github.com/christensen143/klogger