v1k0d3n / bootkube-ci

Bootkube-CI is a simple Kubernetes environment that can be used for a number of CI, development and/or demonstration scenarios.
Apache License 2.0
8 stars 7 forks source link

kube-router SDN not working #4

Open bzub opened 7 years ago

bzub commented 7 years ago

Bringing the discussion from #3 to a proper issue.

The error with seen with kube-router is:

ubuntu@osh-sh-ci-01:~$ kubectl logs  kube-router-hkf2d -n kube-system
panic: nodes "kubernetes" not found

goroutine 1 [running]:
panic(0x1596120, 0xc42040a450)
    /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/cloudnativelabs/kube-router/app/controllers.NewNetworkPolicyController(0xc420315540, 0xc420314960, 0x0, 0x0, 0x0)
    /home/kube/go/src/github.com/cloudnativelabs/kube-router/app/controllers/network_policy_controller.go:785 +0x413
github.com/cloudnativelabs/kube-router/app.(*KubeRouter).Run(0xc4203c1660, 0xc4203c1660, 0x0)
    /home/kube/go/src/github.com/cloudnativelabs/kube-router/app/server.go:120 +0x710
main.main()
    /home/kube/go/src/github.com/cloudnativelabs/kube-router/kube-router.go:37 +0x13c
ubuntu@osh-sh-ci-01:~$ 
bzub commented 7 years ago

@v1k0d3n I know the kube-router author recently made a change to the code this panic points to.

I believe it's a bug with this new code, but be sure you are using the latest kube-router docker image anyways since there's only a latest tagged image available.

I've opened issue kube-router#23 to hopefully get that resolved.

bzub commented 7 years ago

kube-router upstream has been changed to hopefully support anything for a nodeName with kube-router run as a pod. So you might want to docker pull it again and try it out. I would try it out but I haven't had time to deploy any Ubuntu servers or VMs yet.

v1k0d3n commented 7 years ago

sorry took me so long to get back to this @bzub...was (and am) in the process of moving to Denver, CO. i'm on break this week and should be able to test this, and get back to you. thanks for resolving some of those issues upstream though!

bzub commented 7 years ago

No problem @v1k0d3n. I also hope to try this out soon.

By the way, I think you should try the CNI configuration with hairPinMode set to true. I'm still testing this out but so far it seems to fix some issues with pods talking to master components on the same host. After testing it will go into the kube-router repo officially.

So it would like:

{
  "name":"kubernetes",
  "type":"bridge",
  "bridge":"kube-bridge",
  "hairpinMode": true,
  "isDefaultGateway":true,
  "ipam": {
      "type":"host-local"
  }
}