Error: unknown command "oidc-login" for "kubectl" (DEBIAN)
berndschatz opened this issue · 1 comments
berndschatz commented
Describe the issue
Login with kubelogin plugin works not.
kubelogin was installed with
sudo` snap install kubelogin
kubelogin_linux_amd64.zip
kubectl was installed with debian package manager
To reproduce
A console log or steps to reproduce the issue.
Option 1)
$ sudo snap install kubelogin
kubelogin v0.0.27 from Miguel Alvarado (exodus) installed
$ kubectl get nodes
Error: unknown command "oidc-login" for "kubectl"
Run 'kubectl --help' for usage.
Error: unknown command "oidc-login" for "kubectl"
Run 'kubectl --help' for usage.
Error: unknown command "oidc-login" for "kubectl"
Run 'kubectl --help' for usage.
Error: unknown command "oidc-login" for "kubectl"
Run 'kubectl --help' for usage.
Error: unknown command "oidc-login" for "kubectl"
Run 'kubectl --help' for usage.
Unable to connect to the server: getting credentials: exec: executable kubectl failed with exit code 1
Option 2)
$ ls -l /usr/local/bin/kubectl-oidc-login
lrwxrwxrwx 1 root root 30 Feb 28 13:34 /usr/local/bin/kubectl-oidc-login -> /usr/local/kubelogin/kubelogin
$ kubectl plugin list
The following compatible plugins are available:
/usr/local/bin/kubectl-oidc-login
$ kubectl get nodes
Error: unknown command "oidc-login" for "kubectl"
Run 'kubectl --help' for usage.
Error: unknown command "oidc-login" for "kubectl"
Run 'kubectl --help' for usage.
Error: unknown command "oidc-login" for "kubectl"
Run 'kubectl --help' for usage.
Error: unknown command "oidc-login" for "kubectl"
Run 'kubectl --help' for usage.
Error: unknown command "oidc-login" for "kubectl"
Run 'kubectl --help' for usage.
Unable to connect to the server: getting credentials: exec: executable kubectl failed with exit code 1
Your environment
- OS: $ Debian 11 (bullseye)
- kubelogin version: (snap -> v0.0.27 and with gz -> V1.26.0)
- kubectl version: e.g. v1.20.5
- OpenID Connect provider: Keycloak
berndschatz commented
Solution -->
$ ls -l /usr/local/bin/kubectl-oidc_login
lrwxrwxrwx 1 root root 30 Feb 28 13:59 /usr/local/bin/kubectl-oidc_login -> /usr/local/kubelogin/kubelogin
Strange: if you change in the kube config the default "oidc-login",
the error message changes accordingly , but it seems not to be used for the real call, only for the error message !?