gitkube icon indicating copy to clipboard operation
gitkube copied to clipboard

Add install instructions for various K8s vendors/distributions

Open tirumaraiselvan opened this issue 7 years ago • 18 comments

Gitkube runs on most Kubernetes distributions/vendors as per the install instructions in README. But in some cases, there may be more configuration required to correctly setup for e.g. exposing the gitkubed service may require configuring a Loadbalancer manually.

We need to document the instructions (docs/install.md) covering various vendors like GKE, Rancher, kops based installations, etc. In most cases, the instructions should be default instructions as provided in the README and in other cases the additional steps should be mentioned.

Please use this issue to mention any distribution which is not covered by the installation instructions.

tirumaraiselvan avatar Mar 16 '18 14:03 tirumaraiselvan

Any particular word of advice for openshift?

adrianog avatar Mar 21 '18 22:03 adrianog

@adrianog Well these are the commands that you would need to run on openshift? Do you foresee that they would run as is on an openshift kubernetes cluster?

kubectl create -f https://raw.githubusercontent.com/hasura/gitkube/master/manifests/gitkube-setup.yaml

This command will create k8s objects in the kube-system namespace.

$ kubectl --namespace kube-system expose deployment gitkubed --type=LoadBalancer --name=gitkubed

This command will expose the deployment on a public IP.

If you can do these 2 things, things should work for you. If you can try them out, please let us know if it works or doesn't and then we can add docs for how to on openshift!

coco98 avatar Mar 21 '18 22:03 coco98

Trying to setup gitkube with minikube, but while creating the remote, I am getting this error: Error from server (Timeout): error when creating "remote.yaml": Timeout: request did not complete within allowed duration

disha94 avatar May 02 '18 10:05 disha94

Sorted, It was Kubernetes version issue.

disha94 avatar May 02 '18 12:05 disha94

@disha94 which version did you have the issue with and which issue fixed it for you? We have docs/minikube.md where we can mention this.

tirumaraiselvan avatar May 02 '18 12:05 tirumaraiselvan

@tirumaraiselvan So I think it was from my side, gitkube support is only after v1.8.7 of kubernetes and I had a older version (1.8.0) in my minikube. Upgrading the kubernetes version in minikube fixed the problem.

disha94 avatar May 02 '18 14:05 disha94

In README

kubectl create -f https://storage.googleapis.com/gitkube/gitkube-setup-stable.yaml

https://storage.googleapis.com/gitkube/gitkube-setup-stable.yaml seems not accessible.

sunfmin avatar Jul 29 '18 15:07 sunfmin

@sunfmin https://storage.googleapis.com/gitkube/gitkube-setup-stable.yaml was not publicly accessible. I have added the correct permissions. Can you try again?

arvi3411301 avatar Jul 29 '18 15:07 arvi3411301

@arvi3411301 Yes it works. I tried gitkube successfully on my local Docker for desktop kubernetes. It works great.

sunfmin avatar Aug 08 '18 08:08 sunfmin

I am seeing these errors..

Error from server (BadRequest): error when creating "https://storage.googleapis.com/gitkube/gitkube-setup-stable.yaml": ClusterRoleBinding in version "v1" cannot be handled as a ClusterRoleBinding: no kind "ClusterRoleBinding" is registered for version "rbac.authorization.k8s.io/v1"

unable to recognize "https://storage.googleapis.com/gitkube/gitkube-setup-stable.yaml": no matches for apiextensions.k8s.io/, Kind=CustomResourceDefinition

mandarku avatar Sep 25 '18 22:09 mandarku

@mandarku Could you please specify additional details like which Kubernetes version, which provider (if any), etc. You may want to open a new issue just for this.

tirumaraiselvan avatar Sep 26 '18 09:09 tirumaraiselvan

kubectl version Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.8", GitCommit:"d74e09bb4e4e7026f45becbed8310665ddcb8514", GitTreeState:"clean", BuildDate:"2017-08-03T18:12:08Z", GoVersion:"go1.7.6", Compiler:"gc", Platform:"linux/amd64"}

I read above gitkube is supported 1.8 onwards?

mandarku avatar Sep 26 '18 17:09 mandarku

@mandarku Yes, as the error suggest your K8s version does not have the APIs like ClusterRoleBinding or CustomResourceDefinition (or have it in a different api group). Hence, gitkube works only 1.8+

tirumaraiselvan avatar Sep 26 '18 17:09 tirumaraiselvan

Hi, I have executed both command

  1. kubectl create -f https://storage.googleapis.com/gitkube/gitkube-setup-stable.yaml
  2. kubectl create -f https://storage.googleapis.com/gitkube/gitkube-setup-stable.yaml

but even after that I get error when I do gitkube --version image

Error message: [ec2-user@ip-172-31-36-215 ~]$ kubectl version Client Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.7-eks-1861c5", GitCommit:"1861c597586f84f1498a9f2151c78d8a6bf47814", GitTreeState:"clean", BuildDate:"2019-09-24T22:12:08Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.9-eks-c0eccc", GitCommit:"c0eccca51d7500bb03b2f163dd8d534ffeb2f7a2", GitTreeState:"clean", BuildDate:"2019-12-22T23:14:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"} [ec2-user@ip-172-31-36-215 ~]$ gitkube --version -bash: gitkube: command not found [ec2-user@ip-172-31-36-215 ~]$ gitkube version -bash: gitkube: command not found

I am running Kubernetes on Amazon EKS

Please let me what is wrong with my installation.

Add output for get svc command image

I see gitkubed service through my get SVC command but when I run git clone command I get git: command not found error.

rahuly1516 avatar Dec 24 '19 11:12 rahuly1516

Hello. I just tried to install the gitkube, but I've got errors:

root@goliat:~# kubectl create -f https://storage.googleapis.com/gitkube/gitkube-setup-stable.yaml
customresourcedefinition.apiextensions.k8s.io/remotes.gitkube.sh created
serviceaccount/gitkube created
clusterrolebinding.rbac.authorization.k8s.io/gitkube created
configmap/gitkube-ci-conf created
unable to recognize "gitkube-setup-stable.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
unable to recognize "gitkube-setup-stable.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"

root@goliat:~# gitkube uninstall
INFO[0000] CustomResourceDefinition remotes.gitkube.sh deleted
INFO[0000] ServiceAccount gitkube deleted
INFO[0000] ClusterRoleBinding gitkube deleted
INFO[0000] ConfigMap gitkube-ci-conf deleted
WARN[0000] Deployment gitkubed does not exist, nothing to do
WARN[0000] Deployment gitkubed does not exist, nothing to do
WARN[0000] Deployment gitkube-controller does not exist, nothing to do
WARN[0000] Deployment gitkube-controller does not exist, nothing to do
WARN[0000] Service gitkubed does not exist, nothing to do
INFO[0000] all gitkube components removed from 'kube-system' namespace

root@goliat:~# gitkube install
INFO[0000] CustomResourceDefinition remotes.gitkube.sh created
INFO[0000] ServiceAccount gitkube created
INFO[0000] ClusterRoleBinding gitkube created
INFO[0000] ConfigMap gitkube-ci-conf created
FATA[0000] installing gitkube failed: error creating gitkubed Deployment: the server could not find the requested resource

root@goliat:~# kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-01-18T23:30:10Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.2", GitCommit:"59603c6e503c87169aea6106f57b9f242f64df89", GitTreeState:"clean", BuildDate:"2020-01-18T23:22:30Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}
root@goliat:~#

Let me know where I made mistake or just check it on microk8s.

Regards Radek Kubiak

easyenglishcoding avatar Jan 27 '20 18:01 easyenglishcoding

Finally I solved the problem by updating file gitkube-setup-stable.yaml to new k8s api.

Let's check my commit #121

root@goliat:~# kubectl create -f gitkube-setup-stable.yaml
customresourcedefinition.apiextensions.k8s.io/remotes.gitkube.sh created
serviceaccount/gitkube created
clusterrolebinding.rbac.authorization.k8s.io/gitkube created
configmap/gitkube-ci-conf created
deployment.apps/gitkubed created
deployment.apps/gitkube-controller created
root@goliat:~#

Regards Radek Kubiak

easyenglishcoding avatar Jan 27 '20 19:01 easyenglishcoding

Hi @easyenglishcoding can you explain how to apply your solution?

sbussard avatar Feb 23 '20 01:02 sbussard

@sbussard Hi, just check this link: https://github.com/hasura/gitkube/pull/121/commits/416c8d708be79df3f504279d2ab671f634565a5d

easyenglishcoding avatar Feb 24 '20 09:02 easyenglishcoding