Skip to main content

Overview

Proxy for kubectl with token-optimized output. Compacts pod lists, service tables, and log output.

Syntax

Subcommands

rtk kubectl pods

List pods with compact status.
string
Kubernetes namespace
flag
List pods across all namespaces
Output:
Token savings: 75%

rtk kubectl services

List services with compact networking info.
Output:
Token savings: 70%

rtk kubectl logs

Deduplicated pod logs.
string
Container name (for multi-container pods)
flag
Follow log output
number
Number of lines to show
Features:
  • Deduplicates repeated messages
  • Groups similar log patterns
  • Strips k8s metadata
Token savings: 80%

Examples

List Pods in Namespace

View Pod Logs

List All Services

Implementation

Source: src/container.rs

Optimizations

  • Status icons: ✅ Running, 🔄 Pending/CrashLoop, âšī¸ Terminated
  • Container ratios: (2/2) instead of full Ready/Total columns
  • Age formatting: 5h instead of verbose duration
  • Port compaction: :80→30080 instead of full notation

Token Savings Summary