惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
Spread Privacy
Spread Privacy
T
Threatpost
C
Cisco Blogs
P
Palo Alto Networks Blog
AI
AI
Cyberwarzone
Cyberwarzone
NISL@THU
NISL@THU
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
Simon Willison's Weblog
Simon Willison's Weblog
T
Tor Project blog
Latest news
Latest news
AWS News Blog
AWS News Blog
D
Docker
S
SegmentFault 最新的问题
博客园 - 聂微东
WordPress大学
WordPress大学
Vercel News
Vercel News
S
Securelist
爱范儿
爱范儿
J
Java Code Geeks
Know Your Adversary
Know Your Adversary
S
Schneier on Security
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
Last Week in AI
Last Week in AI
D
DataBreaches.Net
宝玉的分享
宝玉的分享
D
Darknet – Hacking Tools, Hacker News & Cyber Security
MongoDB | Blog
MongoDB | Blog
Engineering at Meta
Engineering at Meta
K
Kaspersky official blog
美团技术团队
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
量子位
博客园_首页
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
腾讯CDC
T
Threat Research - Cisco Blogs
雷峰网
雷峰网
有赞技术团队
有赞技术团队
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
S
Security Affairs

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
GROOT: One archive for cluster diagnostics
Hermes Rodrí · 2026-05-03 · via DEV Community

If you have ever SSH’d into three terminals during an incident, copy-pasting kubectl get, kubectl logs, and kubectl describe while the clock ticks, you already know the problem: manual capture is slow, inconsistent, and easy to get wrong—especially on large clusters.

GROOT is a small open-source Go CLI ( Cobra + Viper ) that automates that workflow. You configure namespaces, workloads, and options once; GROOT runs the right kubectl invocations in parallel, writes a predictable directory layout, and produces a single .tar.gz you can attach to a ticket, upload to storage, or hand to a vendor.

This post walks through why it exists, how it behaves, and how to run it safely in production—including notifications, cron, and the guardrails around optional extra_kubectl commands.

Big picture (one glance)

Diagram Overview

Illustrative pipeline: parallel diagnostics work converging into one archive — same dark / mint visual language as the project hero; not a literal spec diagram.


The problem GROOT solves

During troubleshooting or post-incident review, you usually need a bundle of evidence:

  • Cluster-wide signals: nodes, events, pod list
  • Namespace-scoped resources and pod logs (sometimes including previous container logs)
  • Optional node detail (describe, top) when the incident touches capacity or scheduling
  • A sanitized snapshot of kube context (not the raw secret file—GROOT writes a summary under extras/)

Doing that by hand means dozens of commands, different filenames every time, and no guarantee the next engineer collects the same shape of data. GROOT’s goal is repeatable, fast capture with one entrypoint: groot collect.


What GROOT actually does

Under the hood, GROOT still uses kubectl as the execution engine (no in-cluster agent). That keeps RBAC and behavior aligned with what operators already understand, while worker concurrency (collection.worker_concurrency) speeds up I/O-bound phases.

High-level features (see the README for the full list):

Area What you get
Concurrency Configurable worker pool for parallel kubectl jobs
Scope Namespaces, optional per-namespace targets (Deployments, StatefulSets, DaemonSets, Helm release instance labels)
Logs Optional pod logs, optional --previous, configurable tail (including 0 for full logs)
Packaging Timestamped capture dir → .tar.gz; paths inside the archive are prefixed with the capture folder so extractions do not collide
Config YAML + GROOT_* environment overrides
Notify Slack, Discord, Teams, PagerDuty Events API v2, Telegram, generic JSON webhooks; multiple endpoints via ;-separated URLs or chat IDs
Ops UX --verbose, --quiet, --no-notify, --test-connection, --message suffix for archive names
Container Rootless-oriented Dockerfile for air-gapped or locked-down environments

Notifications send a one-line summary (totals, duration, output dir, archive path). Outbound HTTP uses a bounded client timeout so a stuck webhook does not hang the whole run.


Quick start

Prerequisites (all installs): kubectl on PATH, a valid kubeconfig, and RBAC sufficient for read/list/log operations.

Prerequisites (build from source only): Go 1.26+ and Git.

Install from GitHub Releases

Stylized release channels: package managers and tarball — mint on dark, matching the hero art direction.

Pre-built .deb, .rpm, .tar.gz (and .zip on Windows) are published on Releases. GoReleaser names files with the semver without v (e.g. groot_0.1.8_amd64.deb), while the GitHub download URL uses the tag with v (…/download/v0.1.8/…). Use TAG for the path and VER="${TAG#v}" for the filename, or copy exact names from the release page.

Replace v0.1.8 / 0.1.8 and amd64 below with the release and CPU you need (arm64 on many ARM machines).

Debian / Ubuntu (.deb)

Installs the groot binary under /usr/bin and ships a sample at /etc/groot/groot.yml.sample (from configs/groot.yml.sample in the repo). For a machine-wide active config, copy it: sudo cp /etc/groot/groot.yml.sample /etc/groot/groot.yml and edit groot.yml, or rely on default discovery (see Configuration model).

TAG=v0.1.8
VER="${TAG#v}"
DEB="groot_${VER}_amd64.deb"
TMP="/tmp/${DEB}"
if ! curl -fsSL "https://github.com/hrodrig/groot/releases/download/${TAG}/${DEB}" -o "$TMP"; then
  echo "Download failed — check tag and filename (basename has no v)." >&2; exit 1
fi
[ -f "$TMP" ] || { echo "Missing $TMP after curl" >&2; exit 1; }
sudo apt install "$TMP"
# or: sudo dpkg -i "$TMP"
groot --version

Enter fullscreen mode Exit fullscreen mode

On Debian/Ubuntu, installing a .deb from $HOME can trigger _apt permission denied if your home is not traversable; /tmp avoids that.

Fedora / RHEL / AlmaLinux / Rocky (.rpm)

Same binary path and /etc/groot/groot.yml.sample layout as the .deb.

TAG=v0.1.8
VER="${TAG#v}"
curl -fsSLO "https://github.com/hrodrig/groot/releases/download/${TAG}/groot_${VER}_amd64.rpm"
sudo rpm -Uvh "groot_${VER}_amd64.rpm"
# or: sudo dnf install "./groot_${VER}_amd64.rpm"
groot --version

Enter fullscreen mode Exit fullscreen mode

Tarball (Linux / macOS, no package manager)

Archive names look like groot_0.1.8_linux_amd64.tar.gz or groot_0.1.8_darwin_arm64.tar.gz (no v in the basename).

TAG=v0.1.8
VER="${TAG#v}"
OS=linux    # or: darwin
ARCH=amd64  # or: arm64
curl -fsSLO "https://github.com/hrodrig/groot/releases/download/${TAG}/groot_${VER}_${OS}_${ARCH}.tar.gz"
tar xzf "groot_${VER}_${OS}_${ARCH}.tar.gz"
# GoReleaser wraps files in a directory named like the archive without .tar.gz — adjust if your layout differs.
cd "groot_${VER}_${OS}_${ARCH}"
./groot --version

Enter fullscreen mode Exit fullscreen mode

On Windows, download the matching .zip, unpack it, and run groot.exe from a terminal with kubectl available.

After any install, generate or reuse a config and run groot collect (see below). With no --config, GROOT picks the first existing file among ./groot.yml, ~/.groot/groot.yml, /etc/groot/groot.yml, then /etc/groot/groot.yml.sample. You can always pass --config /path/to/file.yaml.

Build from source

git clone https://github.com/hrodrig/groot.git
cd groot
make build

Enter fullscreen mode Exit fullscreen mode

Generate a starter config (matches the repo’s sample and groot --print-sample-config):

./bin/groot --print-sample-config > groot.yml
# Edit namespaces, targets, output_dir, notify.*, etc.
./bin/groot collect

Enter fullscreen mode Exit fullscreen mode

Handy flags:

  • --test-connection — sanity-check cluster access without collecting
  • --verbose — print each command as it runs
  • --quiet — suppress normal console noise; notifications still fire unless disabled in config
  • --no-notify — skip all notify channels for this run (same as GROOT_NO_NOTIFY=1)
  • --message "meaningful-label" — sanitized suffix on archive / related names

Configuration model

If you pass --config /path/to/file.yaml, that file is the only YAML source for that run.

Otherwise the first existing file wins, in this order:

  1. ./groot.yml
  2. ~/.groot/groot.yml
  3. /etc/groot/groot.yml
  4. /etc/groot/groot.yml.sample

If none of those exist, built-in defaults apply, and GROOT_* environment variables override where documented.

Kubeconfig resolution is documented in the README: CLI flag → KUBECONFIG → YAML kubeconfig → kubectl defaults.

Targets and pod logs

If you define collection.targets for a namespace, pod log collection for that namespace is limited to pods belonging to those workloads. If a namespace has no targets, GROOT keeps broader pod log behavior for that namespace—useful for control-plane or shared namespaces.

Helm instances are matched via app.kubernetes.io/instance as documented in the project.

extra_kubectl: power with guardrails

You can append arbitrary read-only diagnostics as extra jobs, e.g.:

extra_kubectl:
  - "get componentstatuses"
  - "get csr"

Enter fullscreen mode Exit fullscreen mode

GROOT splits each string on whitespace and passes arguments directly to kubectl (no shell). At config load time, only allowlisted, read-oriented first verbs are accepted (for example get, describe, logs, top, …, plus config view … and auth can-i …). Anything else fails fast so a bad paste cannot turn into delete or exec by accident.


Output layout

Each run creates a timestamped working directory under output_dir, then archives it:

  • Archive name: <timestamp>-<cluster>[-<sanitized-message>].tar.gz
  • Inside the tarball: paths are rooted under the capture folder name so extracting many runs into one parent directory (e.g. ~/tmp/groot-out) does not mix kube-system/ trees from different captures.

Typical top-level groups include nodes/, extras/, per-namespace folders, and pod log files named pod__node.log (and .previous.log when enabled).


Notifications in incident workflows

Enable channels in notify.* and provide webhooks or tokens. For PagerDuty Events v2, routing keys can also be ;-separated for multiple integrations. The README spells out payload shape, severity values, and HTTP 202 expectations for PagerDuty.

For cron where you only want the archive locally:

0 * * * * GROOT_NO_NOTIFY=1 /usr/local/bin/groot collect --config /home/you/.groot/prod.yml --quiet

Enter fullscreen mode Exit fullscreen mode


Security and operations notes

  • RBAC: GROOT runs as your kube identity. Tight RBAC on the ServiceAccount or user still applies.
  • Secrets in archives: Logs and describes may contain sensitive material—treat bundles like production data.
  • Notify credentials: Prefer environment variables or secret stores; the README lists GROOT_NOTIFY_* env names.
  • Pre-built binaries: Check GitHub Releases for GoReleaser artifacts when you do not want to compile.

Why Go, Cobra, and Viper?

  • Single static binary easy to ship to bastions and CI agents
  • Familiar CLI patterns (subcommands, persistent flags)
  • Portable configuration (YAML + env) without inventing a new DSL

The repository includes make release-check (lint, race-enabled tests, vulnerability and cyclomatic gates, GoReleaser config validation) for maintainers cutting releases.


Contributing and feedback

GROOT is MIT-licensed. Issues and PRs are welcome against develop (see CONTRIBUTING.md). If you try it on your next incident, open an issue with what worked, what felt missing, or what integrations you would like next.


Closing

GROOT does not replace observability platforms or centralized logging—it compresses the first hour of kubectl archaeology into one repeatable command and one archive. That is often exactly what you need before you dive into traces, metrics, or vendor support.

If this post saved you a round of manual copy-paste, consider starring the repo so others find it faster.


Disclosure: human vs AI in this article

This post is meant to be technically accurate and useful on dev.to; here is how it was produced so you can judge it fairly.

Contribution Approx. share What it covered
Human (maintainer / editor) ~35% Goals for the piece, choice of audience and tone, fact-checking against the real README, .goreleaser.yaml, and shipped behavior; deciding what to include or leave out (e.g. scope of extra_kubectl, install paths).
AI-assisted (Cursor + large language models) ~65% English prose, structure and headings, Mermaid overview, .deb / .rpm / .tar.gz install snippets from release templates (including /tmp download, TAG/VER, /etc/groot/groot.yml.sample discovery), rewrites of an earlier Spanish/Grok-style outline, and editorial tightening for dev.to.

Tools: generative models used inside Cursor; no fully autonomous “agent publish”—a human reviewed the repo-facing claims.

Your responsibility: release filenames and flags can change between tags. Always confirm commands and asset names on GitHub Releases and in the latest README before production use.

Percentages are honest estimates (not measured tokens); they reflect effort and decision ownership, not word count.