Coder Social home page Coder Social logo

gitkube-example's Introduction

gitkube-examples

An nginx example application to be used with gitkube: git push to deploy on to Kubernetes.

Installation instructions

Using kubectl

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

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

Using gitkube CLI

  1. Install Gitkube CLI:

    • Linux/MacOS
    curl https://raw.githubusercontent.com/hasura/gitkube/master/gimme.sh | bash
    • Windows: download the latest release and add it to your PATH.
  2. Use Gitkube CLI to install Gitkube on the cluster:

    gitkube install

Repository configuration

Gitkube works with whatever kind of repository configurations you prefer. Here are some common configurations:

Mono-repo

Your git repo contains configuration + code for your entire application including all your microservices and k8s manifests.

Follow the instructions for mono-repo setups below:

Multi-repo

You have separate repos for your configuration and microservices.

Follow the instructions for multi-repo setup below:

gitkube-example's People

Contributors

coco98 avatar shahidhk avatar surajnarwade avatar tirumaraiselvan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitkube-example's Issues

Add an example where multiple images are built/multiple microservices are deployed

This would be beneficial for new users to see how they could deploy multiple microservices with a single git push command. I noticed that the gitkube cli prompts you to add more containers, so we can definitely build multiple images, but we are only allowed to mention a single Manifests/Chart directory and a single Deployment name. An example would make it clear how to go about deploying multiple micro-services.

Remote Url wait time

How much time do we need to wait to get the remote URL?

I've been waiting for 15 mins and it seems like it's still null.

More info needed on config (at least on GKE)

gitkubed pods are unschedulable on a low config node on GKE (g1-small: 1 vCPU, 1.70 GB memory).

screen shot 2018-04-11 at 6 31 11 pm

Works like a charm on the next available config. Add a min. node config needed either here

the step 5 'Git push and deploy' execute failed

Hi,
I follow the document to run a demo in my k8s cluster. The step from 1 to 4 execute well. But the last step to deploy the service failed.
The k8s cluster version is 1.17( I also tried in 1.15, it fail too)
The main info is as follow:

[root@k8s-master-01 ~]#  kubectl get pods -n kube-system | grep gitkube
gitkube-controller-7f797f8f4b-knpv4       1/1     Running   0          12m
gitkubed-6cf5b7cc4f-gvp6d                 1/1     Running   0          12m
[root@k8s-master-01 ~]# kubectl get svc -n kube-system gitkubed
NAME       TYPE           CLUSTER-IP     EXTERNAL-IP     PORT(S)        AGE
gitkubed   LoadBalancer   172.23.7.132   10.177.92.244   22:31821/TCP   12m
[root@k8s-master-01 ~]# kubectl get remotes myremote -o yaml             
apiVersion: gitkube.sh/v1alpha1
kind: Remote
metadata:
  creationTimestamp: "2019-12-17T07:53:52Z"
  generation: 2
  name: myremote
  namespace: default
  resourceVersion: "314985"
  selfLink: /apis/gitkube.sh/v1alpha1/namespaces/default/remotes/myremote
  uid: d268bf52-5cef-450b-8c5f-dbe417b944ec
spec:
  authorizedKeys:
  - |
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCt5DRW7e3i2zyNnesiNkg2cXbtiSljh2ornhLrnDtiX2sN8qcSFWcjmFtQ67zP897fe7vKl8GdAdt0cpIJeGe4tZgDaksG/hbC4WS1W31NrALkRF+DdGJUa1zuVvdO4svFXdbz4tHb45dnbAgmsoFlUFBlM/sx7lBBAYgLV2C/u26R23Qyq3KV53vko0nR19tPMA3gcmX3D1yoQ1NNojQGEs7D47dViGQbnfh5eZo253xIt40Pcwusk9M0dbw3biZFZDl9Znb0SGghW6FROXckU4WpVLgkZeOLGCTrpslm+Ws3IHqzOUO0ai7wk9YIIF1JRkl5pOQbaUBUUq0x2dsx root@k8s-master-01
  deployments:
  - containers:
    - dockerfile: microservices/nginx/Dockerfile
      name: www
      path: microservice/nginx
    name: www
  manifests:
    helm: {}
    path: manifests
  registry:
    credentials:
      secretKeyRef:
        key: ""
      secretRef: myremote-regsecret
    url: docker.io/currycan
status:
  remoteUrl: ssh://[email protected]/~/git/default-myremote
  remoteUrlDesc: ""
[root@k8s-master-01 ~]

I'm meeting some problems right now with the git push example master command.

[root@k8s-master-01 mono-repo]#   git push myremote master
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (17/17), 3.73 KiB | 0 bytes/s, done.
Total 17 (delta 0), reused 0 (delta 0)
remote: Gitkube build system : Tue Dec 17 07:55:27 UTC 2019: Initialising
remote: 
remote: Creating the build directory
remote: Checking out 'master:5f17cc8c784f05da150e8da8129cae4dca227239' to '/home/default-myremote/build/default-myremote'
remote: 
remote: Found manifests directory
remote: 
remote: Applying...
remote: W1217 07:55:28.786844     209 factory_object_mapping.go:423] Failed to download OpenAPI (the server could not find the requested resource), falling back to swagger
remote: error validating "/home/default-myremote/build/default-myremote/manifests/nginx-deployment.yaml": error validating data: the server could not find the requested resource; if you choose to ignore these errors, turn validation off with --validate=false
remote: error validating "/home/default-myremote/build/default-myremote/manifests/nginx-svc.yaml": error validating data: the server could not find the requested resource; if you choose to ignore these errors, turn validation off with --validate=false
To ssh://[email protected]/~/git/default-myremote
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://[email protected]/~/git/default-myremote'
[root@k8s-master-01 mono-repo]# 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.