hasura / gitkube

Build and deploy docker images to Kubernetes using git push
Apache License 2.0
3.81k stars 208 forks source link

Issue to install gitkube on EKS #90

Closed fabiodouek closed 6 years ago

fabiodouek commented 6 years ago

When I run gitkube install, I'm getting the following error:

FATA[0000] installing gitkube failed: error creating CustomResourceDefinition: customresourcedefinitions.apiextensions.k8s.io is forbidden: User "system:anonymous" cannot create customresourcedefinitions.apiextensions.k8s.io at the cluster scope

tirumaraiselvan commented 6 years ago

Yes, this is a known issue: https://github.com/hasura/gitkube/issues/85

There are 2 workarounds: 1) Create a new kubeconfig which is a proxy of the original one.

cat > ekskubeconfig.proxy <<EOF
apiVersion: v1
clusters:
- cluster:
    insecure-skip-tls-verify: true
    server: http://localhost:8080
  name: local-proxy 
- context:
    cluster: local-proxy
    user: ""
  name: local-proxy
kind: Config
EOF

And, then start the proxy:

kubectl proxy --port=8080 --kubeconfig=${PWD}/kubeconfig.original

Keep this proxy running and in a new shell use the proxy kubeconfig by default.

export KUBECONFIG=${PWD}/ekskubeconfig.proxy

Now, gitkube cli should work.

2) The second way is to not use gitkube cli but directly use kubectl but this is little more complicated.

fabiodouek commented 6 years ago

Thanks @tirumaraiselvan , I tried that approach, but I getting the following error when I run: gitkube install

FATA[0000] installing gitkube failed: error creating CustomResourceDefinition: an error on the server ("") has prevented the request from succeeding (post customresourcedefinitions.apiextensions.k8s.io)

tirumaraiselvan commented 6 years ago

I am sorry. I have been very busy. I will fix this issue properly through this : https://github.com/hasura/gitkube/issues/85

tirumaraiselvan commented 6 years ago

This is now RELEASED in v3.0.0 . Just reinstall gitkube cli again.

curl https://raw.githubusercontent.com/hasura/gitkube/master/gimme.sh | sudo bash