c-bata / kube-prompt

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

kube-prompt does not work with minikube #80

Open frankgerhardt opened 3 years ago

frankgerhardt commented 3 years ago

I don't have kubectl installed but use alias kubectl='minikube kubectl --' instead as described in https://minikube.sigs.k8s.io/docs/handbook/kubectl/.

Then I get this error:

$ kube-prompt 
kube-prompt v1.0.10 (rev-43bcffa)
Please use `exit` or `Ctrl-D` to exit this program.
>>> help
/bin/sh: 1: kubectl: not found
Got error: exit status 127
>>> 
bbugh commented 2 years ago

@frankgerhardt not sure if this still matters for you, but if anyone else ends up here you can resolve this by making a bash script that just passes all args through to minikube.

  1. Create file kubectl
    
    #!/bin/bash

minikube kubectl -- "$@"


2. `chmod +x ./kubectl`
3. `sudo mv ./kubectl /usr/local/bin/kubectl`

Now any programs that need kubectl will actually work (including running as root).