Giter VIP home page Giter VIP logo

Comments (6)

shahidhk avatar shahidhk commented on May 18, 2024

@sdileep Can you paste the kubectl command you used to expose gitkube and the the output of kubectl get remote example -o yaml here?

from gitkube.

coco98 avatar coco98 commented on May 18, 2024

@shahidhk Once we help @sdileep out, let's add instructions for minikube to our docs too!

from gitkube.

sdileep avatar sdileep commented on May 18, 2024

@coco98 This is not a minikube environment(mentioned it above). I'm running a couple VMs using VirtualBox and Vagrant. The VMs are on a private network with static IP addresses assigned to them. The cluster was created with kubeadm and kube-dashboard & a sample service for nginx are up and running fine on the cluster

@shahidhk The command that I used was kubectl --kubeconfig <path_to_conf> --namespace kube-system expose deployment gitkubed --type=NodePort --name=gitkubed. The output for the command kubectl get remote example -o yaml` is

apiVersion: gitkube.sh/v1alpha1
kind: Remote
metadata:
  clusterName: ""
  creationTimestamp: 2018-03-24T12:12:02Z
  name: example
  namespace: default
  resourceVersion: "25276"
  selfLink: /apis/gitkube.sh/v1alpha1/namespaces/default/remotes/example
  uid: 8f664f88-2f5c-11e8-8cb2-525400daa710
spec:
  authorizedKeys:
  - ssh-rsa <key>
  - ssh-rsa <AAAAB3NzaC1yc2...  ...zqCcCZT>
    <user@Machine>
  deployments:
  - containers:
    - dockerfile: Dockerfile
      name: nginx
      path: .
    name: nginx

Since I don't have a load balancer, the remote url isn't generated I reckon.

from gitkube.

shahidhk avatar shahidhk commented on May 18, 2024

@sdileep Can you try setting this remote manually?

$ git remote add example ssh://default-example@<any-node-id>:<node-port>/~/git/default-example

Also, it'll be helpful if you can paste relevant log lines from gitkube-controller so that we could figure out a fix?

NodePort service objects does not have an external ip field in the spec. Hence gitkube might not be able to figure out the IP. But, this should have been reported as a message in the remote object status.

from gitkube.

tirumaraiselvan avatar tirumaraiselvan commented on May 18, 2024

kubectl get remote example -o yaml should have had status section. The status will have a remoteUrlDesc which would tell you to add remote manually since it is of type NodePort. This should be fixed by #37

Apart from this, as @shahidhk mentioned, we do not have the external ip for nodeport service in the service object. We can work around this by going through all the nodes and getting the ip of one of the nodes and filling it in the remote. PRs welcome for this.

from gitkube.

sdileep avatar sdileep commented on May 18, 2024

@shahidhk The logs from the controller are as follows:

time="2018-03-24T14:31:18Z" level=info msg="Setting up event handlers"
time="2018-03-24T14:31:18Z" level=info msg="Initialising gitkube"
time="2018-03-24T14:31:18Z" level=info msg="Waiting for cache sync"
time="2018-03-24T14:31:18Z" level=info msg="Caches are synced"
time="2018-03-24T14:31:18Z" level=info msg="Starting remote worker"
time="2018-03-24T14:31:18Z" level=info msg="Starting configmap worker"
time="2018-03-24T14:31:18Z" level=info msg="Waiting for stop signal"
time="2018-03-24T14:31:18Z" level=info msg="syncing configmap: kube-system.gitkube-ci-conf"
time="2018-03-24T14:31:18Z" level=info msg="syncing configmap: kube-system.gitkube-ci-conf"
time="2018-03-24T17:44:35Z" level=info msg="syncing remote: default.example"

Logs from gitkubed are as follows:

...
Could not load host key: /etc/ssh/ssh_host_dsa_key
Did not receive identification string from 10.1.1.1 port 37504
rexec line 19: Deprecated option KeyRegenerationInterval
rexec line 20: Deprecated option ServerKeyBits
rexec line 31: Deprecated option RSAAuthentication
rexec line 38: Deprecated option RhostsRSAAuthentication
Could not load host key: /etc/ssh/ssh_host_dsa_key
Did not receive identification string from 10.1.1.1 port 37508
rexec line 19: Deprecated option KeyRegenerationInterval
rexec line 20: Deprecated option ServerKeyBits
rexec line 31: Deprecated option RSAAuthentication
rexec line 38: Deprecated option RhostsRSAAuthentication
Could not load host key: /etc/ssh/ssh_host_dsa_key
Did not receive identification string from 10.1.1.1 port 37512
rexec line 19: Deprecated option KeyRegenerationInterval
rexec line 20: Deprecated option ServerKeyBits
rexec line 31: Deprecated option RSAAuthentication
rexec line 38: Deprecated option RhostsRSAAuthentication
Could not load host key: /etc/ssh/ssh_host_dsa_key
Did not receive identification string from 10.1.1.1 port 37516
rexec line 19: Deprecated option KeyRegenerationInterval
rexec line 20: Deprecated option ServerKeyBits
rexec line 31: Deprecated option RSAAuthentication
rexec line 38: Deprecated option RhostsRSAAuthentication
...

^^ those logs seems to keep repeating for every 4th port

@shahidhk thanks for the git remote url, the one from the example doc is not correct. This solves the issue for me.

from gitkube.

Related Issues (20)

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.