Skip to content
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

microk8s kubectl E_REQUISITE_NOT_FOUND #16048

Closed
20 tasks
gnoejuan opened this issue Feb 16, 2020 · 4 comments
Closed
20 tasks

microk8s kubectl E_REQUISITE_NOT_FOUND #16048

gnoejuan opened this issue Feb 16, 2020 · 4 comments
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.

Comments

@gnoejuan
Copy link

gnoejuan commented Feb 16, 2020

Describe the bug

chectl fails ✖ Verify if kubectl is installed with E_REQUISITE_NOT_FOUND

Che version

  • latest
  • nightly
  • other: please specify

chectl/7.8.0 linux-x64 node-v10.18.1

Steps to reproduce

  • Install microk8s via snap store sudo snap install microk8s --classic --channel=1.17/stable
  • Install chectl as instructed on the documents bash <(curl -sL https://www.eclipse.org/che/chectl/)
  • Implement workaround 1 from here microk8s.config | cat - > $HOME/.kube/config After encountering connection refused
  • chectl server:start -m -p microk8s -a helm

Expected behavior

Chectl uses the microk8s.kubectl kubectl.

Runtime

  • kubernetes (include output of kubectl version)
  • Openshift (include output of oc version)
  • minikube (include output of minikube version and kubectl version)
  • minishift (include output of minishift version and oc version)
  • docker-desktop + K8S (include output of docker version and kubectl version)
  • [ x ] other: microk8s v1.17.2

Screenshots

Installation method

  • [ x ] chectl
  • che-operator
  • minishift-addon
  • I don't know

Environment

  • my computer
    • Windows
    • [ x ] Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • other: please specify

Additional context

It looks like chectl uses a repository called `command-exists. Looking at the code, it looks like command-exists simply sends commands to the command line. Chectl's implementation seems to only use command-exists.

So, I looked up how to use bash-aliases in a npm script and came across this stackoverflow solution https://askubuntu.com/a/98791 and implemented it like in my .bashrc :

EDIT: This was the original. Probably led to some of my problems. Look below for the correct addition to .bashrc

kubectl(){
    minikube.kubectl "$@"
}
export -f kubectl

which still did not work

Edit: Should have been

kubectl(){
    microk8s.kubectl "$@"
}
export -f kubectl
@gnoejuan gnoejuan added the kind/bug Outline of a bug - must adhere to the bug report template. label Feb 16, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Feb 16, 2020
@gnoejuan
Copy link
Author

gnoejuan commented Feb 16, 2020

Update: installed kubectl through snap: snap install kubectl --classic

Now I'm ran into a missing helm requirement, even though microk8s has it.

image

Removing the -a helm argument gives me :

✖ 🏃  Installer preflight check
→ Installer  is not supported ¯\_(ツ)_/¯

@tolusha
Copy link
Contributor

tolusha commented Feb 17, 2020

@gnoejuan

  1. Install helm on machine where chectl is installed
    or
  2. Use --installer=operator

@tolusha tolusha added kind/question Questions that haven't been identified as being feature requests or bugs. and removed kind/bug Outline of a bug - must adhere to the bug report template. labels Feb 17, 2020
@ibuziuk ibuziuk added status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach team/deploy and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Feb 17, 2020
@gnoejuan
Copy link
Author

-a operator did the fix. Thank you very much!

hmmm after rebooting, i had to "reimplement workaround 1".

@tolusha tolusha removed the status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach label Feb 17, 2020
@gnoejuan
Copy link
Author

In case somebody came across this thread from google:

kubectl(){
    minikube.kubectl "$@"
}
export -f kubectl

should actually be:

kubectl(){
    microk8s.kubectl "$@"
}
export -f kubectl

Not sure if I would have ran into the helm issue, but this fixed a issue where chectl was hanging on

    ✔ Eclipse Che pod bootstrap
      -> scheduling...done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.
Projects
None yet
Development

No branches or pull requests

4 participants