Skip to content

kubectl get <object> <space> throws exception #26

Closed
@bobhenkel

Description

@bobhenkel

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.

kube-shell> kubectl get ingress Exception in thread Thread-74:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/site-packages/prompt_toolkit/interface.py", line 860, in run
    completions = list(buffer.completer.get_completions(document, complete_event))
  File "/usr/local/lib/python2.7/site-packages/kubeshell/completer.py", line 246, in get_completions
    resources = self.get_resources(arg, namespace)
  File "/usr/local/lib/python2.7/site-packages/kubeshell/completer.py", line 321, in get_resources
    ret = extensionsV1Beta1.list_ingress_for_all_namespaces(watch=False)
  File "/usr/local/lib/python2.7/site-packages/kubernetes/client/apis/extensions_v1beta1_api.py", line 3152, in list_ingress_for_all_namesps
    (data) = self.list_ingress_for_all_namespaces_with_http_info(**kwargs)
  File "/usr/local/lib/python2.7/site-packages/kubernetes/client/apis/extensions_v1beta1_api.py", line 3245, in list_ingress_for_all_namespo
    collection_formats=collection_formats)
  File "/usr/local/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 329, in call_api
    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
  File "/usr/local/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 153, in __call_api
    _request_timeout=_request_timeout)
  File "/usr/local/lib/python2.7/site-packages/kubernetes/client/api_client.py", line 361, in request
    headers=headers)
  File "/usr/local/lib/python2.7/site-packages/kubernetes/client/rest.py", line 240, in GET
    query_params=query_params)
  File "/usr/local/lib/python2.7/site-packages/kubernetes/client/rest.py", line 231, in request
    raise ApiException(http_resp=r)
ApiException: (401)
Reason: Unauthorized
HTTP response headers: HTTPHeaderDict({'Date': 'Wed, 05 Jul 2017 14:05:34 GMT', 'Content-Length': '13', 'Content-Type': 'text/plain; charse)
HTTP response body: Unauthorized

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions