-
Notifications
You must be signed in to change notification settings - Fork 174
kubectl get <object> <space> throws exception #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Kubectl uses go client to talk to api server. Kube-shell uses client-python to talk to api server for resource auto completion. there seems to some problem python api client accessing api server. Could you please try below snippet from your python interactive shell and see if this goes through? from kubernetes import client, config
config.load_kube_config()
v1 = client.CoreV1Api()
v1.list_pod_for_all_namespaces(watch=False) |
Still throws an error.
|
Can you share details of your cluster? (Is it on gke or gce or minikube). |
It's a CoreOS Tectonic cluster on AWS. RBAC is enabled. |
Also I'm just using static users at the moment, if that's of any value to the error. https://coreos.com/tectonic/docs/latest/admin/user-management.html |
Same problem here with GKE |
The authentication problems are described in a bug within client-python here. The workaround provided is to use service accounts. I'll dig through the client-python code a little today. Before I make a change to the code, @clmssz are you using GKE with service accounts? In the short term I propose to handle kube-apiserver endpoint errors like this without disabling the shell's utility. |
@vogxn kubectl uses your gcloud compute credentials I think |
I've redirected the errors to an error log. Kubeshell will not dump stacktraces like this now. The pull request is here You can test this by installing from the branch $ pip install -e git://github.com/vogxn/kube-shell.git@26-handle-client-python-errors#egg=kube-shell |
This is now merged and will be part of the next release along with other bugfixes. |
A new release is pushed to pypi with version |
Hi @vogxn , no more stacktrace thanks (but no completion, guess it'a what you wanted in the short term right ?) |
Kubernetes python client 3.0.0b1 should have a fix for this. Can you guys give it a try and let me know if it fixed your problem? |
Any progress on this? the auto completion is what made we want to use it |
When I run commands like kubectl get pods and press space from within kube-shell 'm getting the below error. On a vanilla bash shell I can execute kubectl get just fine.
The text was updated successfully, but these errors were encountered: