Skip to content

K8s Investigation

Josemalyson Oliveira edited this page Jun 27, 2026 · 1 revision

K8s Investigation

360-degree deep investigation for Kubernetes clusters and VPS servers.


Overview

Orchestrates 12 elite tools for Root Cause Analysis, Kernel Performance, Runtime Security, and Pentesting.

When to Use

  • Investigating cluster issues
  • Security audits
  • Performance analysis
  • Incident response
  • Compliance checks

Trigger Phrases

  • "Investigate my cluster"
  • "Security audit for K8s"
  • "Performance is slow"
  • "Check for vulnerabilities"
  • "Audit this VPS"

The 12 Tools

Category Tools
Observability Glances, Netdata, Popeye, K9s
Network & Tracing Kubeshark, bpftrace
Vulnerability & Compliance Trivy, Kubescape, kube-bench, Lynis
Active Defense Falco, kube-hunter

4-Phase Workflow

Phase 1: Observability & Health

Objective: Understand current state

Tools:

  • Glances — System metrics (CPU, memory, disk, network)
  • Netdata — Real-time monitoring dashboard
  • Popeye — Kubernetes cluster scan
  • K9s — Interactive cluster dashboard

Commands:

# System overview
glances -1

# K8s cluster scan
popeye -o html

# Interactive dashboard
k9s

Phase 2: Network & Tracing

Objective: Analyze network traffic and identify bottlenecks

Tools:

  • Kubeshark — L7 traffic analysis
  • bpftrace — Kernel-level tracing

Commands:

# Capture traffic
kubeshark tap

# CPU profiling
bpftrace -e 'profile:hz:99 { @[kstack] = count(); }'

Phase 3: Vulnerability & Compliance

Objective: Identify security issues

Tools:

  • Trivy — CVE scanning
  • Kubescape — NSA/CIS benchmarks
  • kube-bench — CIS Kubernetes benchmark
  • Lynis — OS hardening audit

Commands:

# Image scanning
trivy image nginx:latest

# Cluster compliance
kube-bench run

# OS audit
lynis audit system

Phase 4: Active Defense & Runtime

Objective: Detect and respond to threats

Tools:

  • Falco — Runtime security events
  • kube-hunter — Internal pentest

Commands:

# Runtime monitoring
falco

# Pentest
kube-hunter --remote 10.0.0.0/24

Output

An interactive HTML report (/tmp/investigation/ultimate_report.html) with:

  • Executive RCA tab — Root cause analysis summary
  • Threat Intelligence dashboard — Security findings
  • Deep Performance metrics — Performance analysis
  • Runtime Security events — Active threats
  • Risk score — 0-100 rating

Key Files

  • generate_report.py — 1048-line Python report generator
  • install_tools.sh — Auto-installs 9 tools to ~/.local/bin
  • k8s-playbook.md — K8s triage reference (383 lines)
  • vps-playbook.md — VPS/Linux investigation reference (431 lines)

Quick Start

# Install all tools
./install_tools.sh

# Run investigation
python generate_report.py --cluster my-cluster

# View report
open /tmp/investigation/ultimate_report.html

References


Last updated: June 2026

Clone this wiki locally