hasura / gitkube

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

Add install instructions for various K8s vendors/distributions #33

Open tirumaraiselvan opened 6 years ago

tirumaraiselvan commented 6 years ago

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.

adrianog commented 6 years ago

Any particular word of advice for openshift?

coco98 commented 6 years ago

@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!

disha94 commented 6 years ago

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 commented 6 years ago

Sorted, It was Kubernetes version issue.

tirumaraiselvan commented 6 years ago

@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.

disha94 commented 6 years ago

@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.

sunfmin commented 6 years ago

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.

arvi3411301 commented 6 years ago

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

sunfmin commented 6 years ago

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

mandarku commented 6 years ago

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

tirumaraiselvan commented 6 years ago

@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.

mandarku commented 6 years ago

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?

tirumaraiselvan commented 6 years ago

@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+

rahuly1516 commented 4 years ago

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.

easyenglishcoding commented 4 years ago

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 commented 4 years ago

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

sbussard commented 4 years ago

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

easyenglishcoding commented 4 years ago

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