kube-shell
kube-shell copied to clipboard
Pod name autocompletion does not work for the kubectl logs command
Issue: When attempting to use the kubectl logs command, the available pods are not displayed.
Steps to reproduce: With the kube-shell open, type kubectl logs and hit the tab key
Expected Results: The available pods are displayed in the shell
Observed Results: Nothing is displayed
@mbangert-smarsh thanks for opening issue. We will work on it.
In general, there are scenarios like 'kubectl logs' which need to be handled case by case (unlike kubeclt get kubectl-resource-name for e.g). I am collecting such scenarios, and make kube-shell at the least compatible with kubectl auto completion. We will fix it next release.
I am having the same issue.. for few people its working on mac. I am using centos and trying on the master node and it's not working for me
I am using a centos machine to run kubectl and executing the below instruction worked for me
yum install bash-completion
echo 'source <(kubectl completion bash)' >>~/.bashrc
kubectl completion bash >/etc/bash_completion.d/kubectl
echo "alias k=\'kubectl\'" >> ~/.bashrc
echo 'complete -F __start_kubectl k' >>~/.bashrc
source ~/.bashrc
once it's completed, it should be able to get the response with TAB TAB
got the problem too running
- inside bash
- on WSL2/Ubuntu 20.04.2 LTS
- in connection with AWS EKS and IAM auth which needs the
aws-iam-authenticator
i noticed that
- every once in a great while it works
- always? when i just do
kubectl logs TAB TAB
then i get listed the files in the current dir