kubectl: Bash autocompletion hangs when additional authentication (in addition to having access credential) is required
What happened: I have a Azure Kuberenetes Service cluster with enabled Azure AD integration. When you use the bash autocompletion, before you make an additional authorization, then autocompletion operation hangs.
What you expected to happen: The operation does not hang. I am asked for an additional authorization.
How to reproduce it (as minimally and precisely as possible):
- Create an AKS (Azure Kubernetes Service) cluster with Azure AD enabled (https://docs.microsoft.com/en-us/azure/aks/managed-aad#create-an-aks-cluster-with-azure-ad-enabled)
- Get access credentials for a managed Kubernetes cluster. Using Azure CLI:
az aks get-credentials --name MyManagedCluster --resource-group MyResourceGroup - Open terminal and write
kubectl get pod. Click TAB to get autocompletion.
The operation hangs. You cannot continue typing. The solution is to abort (Ctrl+C) or close the terminal.
Anything else we need to know?: Azure Kuberenetes Service with enabled Azure AD integration requires additional authentication (in addition to having access credential). It looks as follows:
180254@computer:~$ kubectl get pod
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code CKXXXXXXX to authenticate.
Environment:
- Kubernetes client and server versions (use
kubectl version):
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.1", GitCommit:"206bcadf021e76c27513500ca24182692aabd17e", GitTreeState:"clean", BuildDate:"2020-09-09T11:26:42Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.9", GitCommit:"f862ce9a809b9832be36717bfc4efae470f59fbf", GitTreeState:"clean", BuildDate:"2020-08-24T18:41:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
- Cloud provider or hardware configuration:
Azure - OS (e.g:
cat /etc/os-release):
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (7 by maintainers)
@fejta-bot: Closing this issue.
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.