Skip to content

Add documentation site for every tool (GitHub Pages) - #9

Merged
ngpayyappilly merged 1 commit into
mainfrom
docs/github-pages
Nov 19, 2026
Merged

ngpayyappilly merged 1 commit into
mainfrom
docs/github-pages

Conversation

@ngpayyappilly

Copy link
Copy Markdown
Owner

Summary

  • A MkDocs Material site under docs/, to be published at https://ngpayyappilly.github.io/k8s-debug/. It has:
    • installation: attach to a pod, copy a crashing pod, debug a node, run locally, mirror or build the image
    • permissions and profiles: RBAC, what each profile grants, non-root pods, which tool needs which capability
    • a section for each of the 67 shipped tools, grouped into 7 pages, with the package, the permissions it needs, and Kubernetes-focused examples
    • symptom-based recipes, troubleshooting, and contributing guides
  • docs.yml builds the site with mkdocs build --strict (broken links and anchors fail) on PRs, and deploys to GitHub Pages on pushes to main.
  • scripts/check-docs.sh fails CI if a tool in the smoke test has no docs section, so the docs can't fall behind the image. The smoke test now covers all 67 tools (it was 39).

Verified against a real cluster

I ran the claims on a throwaway kind cluster (kubectl 1.36, containerd). This corrected some of my earlier statements, and this PR fixes them in the README and banner:

  • The default general profile already includes SYS_PTRACE and NET_RAW, so tcpdump works without netadmin.
  • netadmin adds NET_ADMIN but drops SYS_PTRACE.
  • --custom capability lists replace the profile's lists.
  • Ephemeral containers get no service account token. The docs show how to borrow the target's through /proc/<pid>/root, and I tested that.
  • A pod with runAsUser: 1000 gives a debug container with no capabilities. --custom with runAsUser: 0 fixes it.
  • --profile=restricted fails with CreateContainerConfigError because the image runs as root. It works with --custom and a numeric uid.
  • kubectl debug -i loses short or binary output. The docs use the "create with sleep, then kubectl exec" pattern, which I tested for pcap streaming and kubectl cp -c.
  • On the kind node, kube-proxy rules were only visible through the nft variant of iptables, so the docs explain iptables-legacy versus nft.

Test plan

  • scripts/smoke-test.sh: all 67 tools present and runnable on arm64
  • scripts/check-docs.sh: all 67 tools documented
  • mkdocs build --strict with anchor validation: clean
  • shellcheck and actionlint clean
  • PR checks green, including the amd64 smoke test
  • After merge: the Docs workflow deploys and https://ngpayyappilly.github.io/k8s-debug/ loads

Notes

  • The examples use ghcr.io/ngpayyappilly/k8s-debug:latest. That tag does not exist yet. It is only published with the first stable version tag, and today only edge and sha-* exist. Push v0.1.0 after merging, or the quick-start commands will fail with manifest unknown.
  • I have not looked at the rendered site in a browser. It builds cleanly, but a visual pass is worth doing.
  • The bpftrace, dmesg, iotop, nsenter and node-debug behaviour was tested on Docker Desktop's Linux kernel through kind. Managed cloud node kernels may differ.

🤖 Generated with Claude Code

- MkDocs Material site under docs/: installation, permissions and
  profiles, a section for each of the 67 shipped tools, symptom-based
  recipes, troubleshooting, contributing
- docs.yml: strict build on PRs, deploy to GitHub Pages on main
- scripts/check-docs.sh fails CI if a tool in the smoke test has no
  documentation section; smoke test now covers all 67 tools
- Correct capability claims found while testing on a kind cluster:
  tcpdump works with the default profile, netadmin drops SYS_PTRACE

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ngpayyappilly
ngpayyappilly merged commit e01176a into main Nov 19, 2026
7 checks passed
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.

1 participant