c-bata / kube-prompt

An interactive kubernetes client featuring auto-complete.
MIT License
1.79k stars 134 forks source link

After entering the "exec", press the TAB key #10

Closed 0x457 closed 6 years ago

0x457 commented 6 years ago

image

other command is OK

c-bata commented 6 years ago

Hi @Bruce-sz ! Can you tell me your Kubernetes cluster version and the kubectl version?

c-bata commented 6 years ago

Is there an anyone who reproduce this problem?

Kuckkuck commented 6 years ago

yes me - it's not only tab, but also space.

 kubectl version
Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.6", GitCommit:"e569a27d02001e343cb68086bc06d47804f62af6", GitTreeState:"clean", BuildDate:"2016-11-12T05:22:15Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"4+", GitVersion:"v1.4.6-1+530ad0e577004a", GitCommit:"530ad0e577004a2f2b3c5ab620af72957e686a78", GitTreeState:"clean", BuildDate:"2016-12-05T14:26:14Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}
kube-prompt
kube-prompt v1.0.0 (rev-48f2a72)
>>> exec panic: invalid configuration: no configuration has been provided

goroutine 43 [running]:
github.com/c-bata/kube-prompt/kube.NewClient(0x0)
        /Users/c-bata/Projects/Golang/src/github.com/c-bata/kube-prompt/kube/client.go:29 +0x140
github.com/c-bata/kube-prompt/kube.getClient(0x0)
        /Users/c-bata/Projects/Golang/src/github.com/c-bata/kube-prompt/kube/client.go:14 +0x2e
github.com/c-bata/kube-prompt/kube.fetchPods()
        /Users/c-bata/Projects/Golang/src/github.com/c-bata/kube-prompt/kube/resource.go:140 +0x72
created by github.com/c-bata/kube-prompt/kube.getPodSuggestions
        /Users/c-bata/Projects/Golang/src/github.com/c-bata/kube-prompt/kube/resource.go:146 +0x39
c-bata commented 6 years ago

@Kuckkuck thanks for reporting! Can you paste the result of kubectl get pod? and I want to know your kubernetes cluster version.

Kuckkuck commented 6 years ago

Our kubernetes clusters are still on 1.4.6

                    "kernelVersion": "4.12.7-coreos",
                    "osImage": "Container Linux by CoreOS 1465.6.0 (Ladybug)",
                    "containerRuntimeVersion": "docker://1.12.6",
                    "kubeletVersion": "v1.4.6+coreos.0",
                    "kubeProxyVersion": "v1.4.6+coreos.0",
                    "operatingSystem": "linux",
                    "architecture": "amd64"

kubectl get pod
NAME                                           READY     STATUS    RESTARTS   AGE
ad-healthcheck-132333051-2vzwb                 1/1       Running   123        14d
barbican-api-570448119-r3vgj                   1/1       Running   0          11d
barbican-api-570448119-vs531                   1/1       Running   22         14d
cinder-api-4082979327-0dasx                    2/2       Running   0          2d
cinder-api-4082979327-ru8im                    2/2       Running   0          2d
cinder-scheduler-2369728407-0uc38              1/1       Running   0          2d
...
  info: 9 completed object(s) was(were) not shown in pods list. Pass --show-all to see all objects.
0x457 commented 6 years ago

I don't use default config (ex: User/bruce/.kube/config ). I have three kube env (product,stage,dev) config. I always switch them(export dev.config on Mac) when I want to connect someone env, then type kubetctl get pods....

c-bata commented 6 years ago

Now, I try to fix this problem.

ultimateboy commented 6 years ago

@Bruce-sz, @Kuckkuck, @c-bata: btw, this has been resolved via my PR. https://github.com/c-bata/kube-prompt/pull/20