Overview
Proxy forkubectl with token-optimized output. Compacts pod lists, service tables, and log output.
Syntax
Subcommands
rtk kubectl pods
List pods with compact status.Kubernetes namespace
List pods across all namespaces
rtk kubectl services
List services with compact networking info.rtk kubectl logs
Deduplicated pod logs.Container name (for multi-container pods)
Follow log output
Number of lines to show
- Deduplicates repeated messages
- Groups similar log patterns
- Strips k8s metadata
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:
5hinstead of verbose duration - Port compaction:
:80→30080instead of full notation
Related Commands
- rtk docker - Docker operations
- rtk log - Log filtering
Token Savings Summary
| Command | Standard | RTK | Savings |
|---|---|---|---|
pods | ~800 tokens | ~200 tokens | 75% |
services | ~500 tokens | ~150 tokens | 70% |
logs | ~2000 tokens | ~400 tokens | 80% |
