che icon indicating copy to clipboard operation
che copied to clipboard

Cannot boot Che on AWS

Open AmitChameides opened this issue 7 years ago • 7 comments

Describe the bug

Hey all, I'm trying to deploy and run Che on AWS following this official guide. While I'm trying to deploy it on AWS's EKS and not EC2, I'm assuming there isn't much difference. When I'm trying to create Che using Chectl, I get the following error:

❯ ✈️ Kubernetes preflight checklist ✔ Verify if kubectl is installed ✖ Verify remote kubernetes status → E_PLATFORM_NOT_READY: Error: serviceaccounts is forbidden: User "system:anonymous" cannot list serviceaccounts in the namespace "default" Verify domain is set › Error: E_PLATFORM_NOT_READY: Error: serviceaccounts is forbidden: User "system:anonymous" cannot list serviceaccounts in the namespace "default"

Che version

  • [X] latest
  • [ ] nightly
  • [ ] other: please specify

Steps to reproduce

  1. Get an EKS server on AWS
  2. Install Chectl on it
  3. Run the command chectl server:start --platform=k8s --installer=helm --domain=aws.my-ide.cloud --multiuser --tls --chenamespace=che-namespace

Expected behavior

A proper running of Che on AWS.

Runtime

  • [X] 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)
  • [ ] other: (please specify) Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.5", GitCommit:"753b2dbc622f5cc417845f0ff8a77f539a4213ea", GitTreeState:"clean", BuildDate:"2018-12-06T01:33:57Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.10-eks-7f15cc", GitCommit:"7f15ccb4e58f112866f7ddcfebf563f199558488", GitTreeState:"clean", BuildDate:"2019-08-19T17:46:02Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

Screenshots

Installation method

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

Environment

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

Additional context

  • I'm running all the commands from an environment where I have sudo priviledges.
  • I'm working from an enterprize environment behind a proxy, but obviously the AWS server is outside the network.
  • As specified, I'm running this on EKS and not EC2. I skipped the first part of this guide (Preparing the AWS system for installing Che) as I do not need to set up K8s.
  • I tried creating my own namespace and context in Kubernetes and switching to them, but the error still repeated (Even when running the chectl start command with ``--chenamespace=<my_created_namespace>). The error still talked about the namespace "default", so either --chenamespace doesn't change anything or this error print isn't too accurate.

AmitChameides avatar Sep 26 '19 09:09 AmitChameides

It kind of duplicates https://github.com/eclipse/che/issues/14534

sleshchenko avatar Sep 26 '19 09:09 sleshchenko

@AmitChameides As we can wee from the error message system:anonymous user's context is set for kubectl. Are you able to use user who has admin rights?

sleshchenko avatar Sep 26 '19 09:09 sleshchenko

Hey there @sleshchenko, I am using a more or less pristine EKS setup, and as such there aren't any users there beyond 'default'. I'm not very experienced with K8s, but I tried creating my own serviceAccount using:

[ec2-user@ip-10-65-135-83 ~]$ kubectl apply -f - <<E0F
 apiVersion: v1
 kind: ServiceAccount
 metadata:
   name: build-robot
 E0F

And then role-binding it to admin on the default namespace using: kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=default:build-robot I then tried running the chectl server:start command like before but got the same error.

I'm sorry for asking dumb questions, but I gotta make sure the following things:

  1. In my chectl server:start command, am I supposed to specify a domain that isn't aws.my-ide.cloud?
  2. How can I check which user I'm currently using in K8s? How can I change this user?

Please advise.

AmitChameides avatar Sep 26 '19 11:09 AmitChameides

  1. In my chectl server:start command, am I supposed to specify a domain that isn't aws.my-ide.cloud?

It's true. You should register your own DNS zone using domain you own https://www.eclipse.org/che/docs/che-7/deploying-che-on-kubernetes-on-aws/#setting-up-dns

  1. How can I check which user I'm currently using in K8s? How can I change this user?

Maybe kubectl config current-context shows something useful, like it's che/192-168-99-100:8443/admin in my case.

sleshchenko avatar Sep 26 '19 11:09 sleshchenko

This looks to me like the doc is insufficient, hence a bug. I think AWS is not a mainline case, hence P2

tsmaeder avatar Sep 26 '19 14:09 tsmaeder

@sleshchenko thanks for the response, and @tsmaeder thanks for looking into better documentation in the future.

  1. It turned out that I did already have a DNS zone setup, and I changed my chectl server:start command to use it. That didn't seem to change anything regarding the error.
  2. I used the proposed command and got told that my current context is 'aws' (probably the default context, right?). I created a separate context and tried to use it but nothing changed either.

If you have any idea what check I could do to try and pinpoint the error, please let me know. I'd really like to use Che on AWS, so it's a real shame to be stuck on the setup stages.

AmitChameides avatar Oct 02 '19 08:10 AmitChameides

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

che-bot avatar Apr 01 '20 07:04 che-bot