minikube: Tab completion breaks if using recommended alias kubectl='minikube kubectl --'
- install minkube
- add alias kubectl=‘minikube kubectl --’ to .bashrc
- add source <(kubectl completion bash) to .bashrc
result: only the commands get tab-completed, nothing after that.
the underlying issue is this:
$ minikube kubectl __completeNoDesc get p
Error: flags cannot be placed before plugin name: --cluster
this works however:
~/.minikube/cache/linux/v1.22.3/kubectl __completeNoDesc get p
related to this: https://github.com/kubernetes/kubectl/issues/884
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (6 by maintainers)
just realized that my hack doesnt work if the minikube node is down… because of reasons.
this does work however:
it’s even worse though.
found this workaround. put it in bashrc: