kubectl
is the Kubernetes CLI.
If you'd like to contribute, please read the conventions and familiarize yourself with existing commands.
Owner: @kubernetes/kubectl
Label: component/kubectl
Motivation: kubectl brainstorm
- Simplify support for multiple files
- Manifest that can specify multiple files / http(s) URLs
- Default manifest (ala Dockerfile or Makefile)
- Unpack archive (tgz, zip) and then invoke “-f” on that directory
- URL shortening via default URL prefix
- Imperative
set
commands view
commands- Support
run --edit
andcreate --edit
- More
kubectl create <sub-command>
- Support
--dry-run
for every mutation - kubectl commands aliases
- Improve
kubectl run
- Make generated objects more discoverable: suggest the user to do
kubectl get all
to see what's generated (extendall
to more resources) - Make it optional to specify name (auto generate name from image)
- Make
kubectl run --restart=Never
creates Pods (instead of Jobs)
- Make generated objects more discoverable: suggest the user to do
- Create commands/flags for common get + template patterns (e.g. getting service IP address)
- Implement
kubectl cp
to copy files between containers and local for debugging kubectl rollout
- Scripting support
- Add
kubectl top
which lists resource metrics.
- Create a terminal based console, ref docker console (video)
- Add
kubectl sh
, an interactive shell, or make a kubectlshell in contrib and make bash completion part of it (ref pythonshell) - Think about how/whether to invoke generation commands such as
kubectl run
orkubectl create configmap
in bulk, declaratively, such as part of theapply
flow. - ChatOps bot -- such as kubebot (add to tools documentation)
- Make kubectl functionality more discoverable
- Overhaul kubectl help
Print "Usage" at the bottom- Add keywords (critical words) to help
- List valid resources for each command
- Make short description of each command more concrete; use the same language for each command
- Link to docs (kubernetes.io/docs)
- Update
kubectl help
descriptions and examples from docs - Embed formatting and post-process for different media (terminal, man, github, etc.)
- Suppress/hide global flags
[Categorize kubectl commands or list them in alphabetical order](kubernetes/kubernetes#21585)- Implement search in
kubectl help
- Suggest next/alternative commands
- Add a verbosity flag that explains all the things that it's doing
Fix incomplete kubectl bash completion
- Overhaul kubectl help
- Improve error messages (note that not all of these problems are in kubectl itself)
- when kubectl doesn’t know what cluster to talk to
non-existent namespace produces obscure error- line numbers with validation errors
- invalid lines with validation errors
- malformed inputs produce misleading error messages
- non-yaml/json produces obscure error
- error messages for non-existent groups/types
- Suggest resource type when not provided (e.g.
kubectl get my-pod-name
should suggest runningkubectl get pod/my-pod-name
) - errors for other non-existent resources
- Suggest resource type when not provided (e.g.
- lack of apiVersion/kind produces confusing error messages
- update validation errors could be more informative
- field validation errors could be more helpful
- field errors should use json field names
- clearer error for bad image/registry
- no error for illegal scale
- deletion timeout doesn't provide any details
- service creation timeout doesn't provide any details
- create secret with invalid data has obscure error message
- --all-namespaces error is unclear
- exec has unclear errors
- logs has misleading errors
- improve error reporting by adding URLs
- Improve jsonpath / gotemplate error messages (it's tricky to get the path just right)
- error message for user with no permissions is extremely cryptic
- Cleanup
kubectl get/describe
output - Define and document command conventions for users
gcloud
should enable kubectl bash completion when installingkubectl
- Pipe-to-sh to install kubectl
- Static build of kubectl for containers (we have it, but it's not part of the release)
- Move functionality to server
- Eliminate round-trip conversion of API objects in kubectl
- Move preferences out of kubeconfig
- And then add more preferences
- Enable/disable explanatory mode (see kploy output)
- Permanently disable warnings once displayed
- Default labels as columns
- Default
--record
,--save-config
, etc.
- Overhaul cluster-related commands
"kubectl-only Ubernetes": enabe kubectl to target any one of many clusters