-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve microk8s support #14455
Comments
Starting with the refactor in commit b9f6ac7, chectl server:start -p microk8s began failing for me during k8sTasks.testApiTasks with the following:
I found a couple of workarounds after poking around and seeing the loadFromDefault code in chectl/node_modules/@kubernetes/client-node/dist/config.js. Workaround #1
however this gives me this error: "error: write /dev/stdout: permission denied" This alternative:
gives me this error: "/snap/microk8s/1079/bin/sed: couldn't flush stdout: Permission denied" What I found actually works is this:
Update: I found that the errors I mentioned above were somehow due to running the commands in the integrated terminal in vscode. When I run in a regular old external non managed terminal, I do not get the error. Workaround #2 So, theoretically another alternative would be to set the KUBECONFIG environment variable. Suggested Fix
however, that can introduce an undesireable wait-time in a constructor, so maybe callers should pass in an already retrieved context to new KubeHelper. |
I can't make |
This is actually this bug (#16408) I previously submitted and then closed, and which I will now reopen. Re: chectl failing the storage check, it is because chectl uses the original microk8s.status format (some might say 'contract'). I previously submitted a bug here (canonical/microk8s#1041) and the microk8s team (@ktsakalozos) very obligingly fixed it, quite quickly (PR here: canonical/microk8s#1042), by having the default be the original format, which che uses. However, on Aug 20, this commit (canonical/microk8s@7bb1b25) and PR (canonical/microk8s#1208) changed the default to 'pretty', probably unintentionally. @balchua did notice it and commented here (canonical/microk8s#1127 (comment)). I missed it, but @ktsakalozos actually did give me a heads up here (canonical/microk8s#1041 (comment)) I'm not happy with the breaking change, but the comment above makes it clear they intend the default to be 'pretty'. I already changed my own scripts to accommodate this by explicitly setting the --format flag of the microk8s.status call. This must be fixed on the che side as well. |
fyi, if you are using snaps, this is how you would go back to a version of microk8s that should work with chectl:
|
I've been trying to install # chectl server:deploy -m --installer=helm --platform=microk8s
› Current Kubernetes context: 'microk8s'
✔ Verify Kubernetes API...OK
✔ 👀 Looking for an already existing Eclipse Che instance
✔ Verify if Eclipse Che is deployed into namespace "eclipse-che"...it is not
❯ ✈️ MicroK8s preflight checklist
✖ Verify if kubectl is installed
→ E_REQUISITE_NOT_FOUND
Verify if microk8s is installed
Verify if microk8s is running
Start microk8s
Check Kubernetes version
Verify if microk8s ingress and storage addons is enabled
Enable microk8s ingress addon
Enable microk8s storage addon
Retrieving microk8s IP and domain for ingress URLs
Check if cluster accessible
› Error: Error: E_REQUISITE_NOT_FOUND
› Command server:deploy failed. Error log: /root/.cache/chectl/error.log Eclipse Che logs: /tmp/chectl-logs/1619115234533
# cat /root/.cache/chectl/error.log
2021-04-22T18:13:54.762Z Error: Error: E_REQUISITE_NOT_FOUND
2021-04-22T18:13:54.762Z Command server:deploy failed. Error log: /root/.cache/chectl/error.log Eclipse Che logs: /tmp/chectl-logs/1619115234533
2021-04-22T18:13:54.762Z at Object.error (/usr/local/lib/chectl/node_modules/@oclif/errors/lib/index.js:26:15)
2021-04-22T18:13:54.762Z at Deploy.error (/usr/local/lib/chectl/node_modules/@oclif/command/lib/command.js:60:23)
2021-04-22T18:13:54.762Z at Deploy.<anonymous> (/usr/local/lib/chectl/lib/commands/server/deploy.js:253:22)
2021-04-22T18:13:54.762Z at Generator.throw (<anonymous>)
2021-04-22T18:13:54.762Z at rejected (/usr/local/lib/chectl/node_modules/tslib/tslib.js:115:69)
# cat /tmp/chectl-logs/1619115234533
cat: /tmp/chectl-logs/1619115234533: No such file or directory |
By default you should use microk8s.kubectl and looking the code it's expects kubectl only. This got fixed after creating an alias for me:
Hope this helps you! |
From chectl created by l0rd: che-incubator/chectl#196
A first PR has been merged to support microk8s but there are some issues to address. In particular
The text was updated successfully, but these errors were encountered: