2026-01-15 14:24:42
Yes, the script emitted by "kubectl completion zsh" supports resource names!
#kubernetes #zsh #shell
If you use #zsh and are interested in plugins, themes, tab completions or example setups for it, check out my https://github.com/unixorn/awesome-zsh-plugins/ list.
Internally the registered completion function runs kubectl __complete with the same terms, like: `kubectl __complete get ns ku`, which emits a list of terms back to the completion function.
kubectl can be run with higher verbosity (eg -v6) to see the underlying requests being made to the remote server, but they're the normal ones to retrieve a list of resources (eg GET https://10.11.12.13:6443/api/v1/namespaces?limit=500).
#kubernetes #zsh #shell #completion
Relevant code in kubectl doing the completions: #kubernetes #zsh #shell #completion