Context
RTK has basic kubectl support (pods, services, logs) in src/container.rs but many common commands and global flags are missing.
Current state
| Command |
Status |
Filter |
kubectl get pods |
Rust |
Compact table |
kubectl get services |
Rust |
Compact table |
kubectl logs <pod> |
Rust |
Dedup |
kubectl <other> |
Passthrough |
No filtering |
Missing global flags (priority)
All kubectl subcommands support these flags but RTK ignores them:
--context — multi-cluster (essential for devops)
--kubeconfig — custom config file
-n / --namespace — only on pods/services, not on other subcommands
-l / --selector — label selector
--as / --as-group — impersonation
Scope — TOML filters preferred
| Command |
Description |
Approach |
Expected savings |
kubectl get deployments |
Deployment list |
TOML — strip headers, compact table |
60-70% |
kubectl get nodes |
Node list |
TOML — strip headers, compact |
60-70% |
kubectl get configmaps |
ConfigMap list |
TOML — compact table |
60-70% |
kubectl get ingress |
Ingress list |
TOML — compact table |
60-70% |
kubectl get all |
All resources |
TOML — strip empty, compact |
70-80% |
kubectl describe pod |
Pod details |
TOML — strip events noise, keep status |
70-80% |
kubectl describe node |
Node details |
TOML — strip conditions/events noise |
70-80% |
kubectl apply -f |
Apply output |
TOML — short-circuit on "configured/created" |
80-90% |
kubectl top pods |
Resource usage |
TOML — compact table |
50-60% |
kubectl top nodes |
Node usage |
TOML — compact table |
50-60% |
kubectl rollout status |
Rollout status |
TOML — short-circuit on success |
80% |
kubectl exec |
Exec passthrough |
No filter needed |
0% |
Global flags (Rust change needed)
The KubectlCommands enum in main.rs needs a shared struct for global flags (--context, --kubeconfig, -n, -l, --as) forwarded to all subcommands. This is a Rust change in main.rs + container.rs.
Implementation priority
- Global flags (Rust) —
--context, --kubeconfig, -n, -l on all subcommands
- TOML filters —
kubectl-describe.toml, kubectl-apply.toml, kubectl-rollout.toml
- Additional get resources — TOML for deployments, nodes, configmaps, ingress
References
Context
RTK has basic kubectl support (pods, services, logs) in
src/container.rsbut many common commands and global flags are missing.Current state
kubectl get podskubectl get serviceskubectl logs <pod>kubectl <other>Missing global flags (priority)
All kubectl subcommands support these flags but RTK ignores them:
--context— multi-cluster (essential for devops)--kubeconfig— custom config file-n/--namespace— only on pods/services, not on other subcommands-l/--selector— label selector--as/--as-group— impersonationScope — TOML filters preferred
kubectl get deploymentskubectl get nodeskubectl get configmapskubectl get ingresskubectl get allkubectl describe podkubectl describe nodekubectl apply -fkubectl top podskubectl top nodeskubectl rollout statuskubectl execGlobal flags (Rust change needed)
The
KubectlCommandsenum inmain.rsneeds a shared struct for global flags (--context,--kubeconfig,-n,-l,--as) forwarded to all subcommands. This is a Rust change inmain.rs+container.rs.Implementation priority
--context,--kubeconfig,-n,-lon all subcommandskubectl-describe.toml,kubectl-apply.toml,kubectl-rollout.tomlReferences
src/container.rs(kubectl_pods, kubectl_services, kubectl_logs)src/discover/rules.rs(kubectl already has rewrite)