You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
3.5 KiB

  1. # Kube-router
  2. Kube-router is a L3 CNI provider, as such it will setup IPv4 routing between
  3. nodes to provide Pods' networks reachability.
  4. See [kube-router documentation](https://www.kube-router.io/).
  5. ## Verifying kube-router install
  6. Kube-router runs its pods as a `DaemonSet` in the `kube-system` namespace:
  7. * Check the status of kube-router pods
  8. ```ShellSession
  9. # From the CLI
  10. kubectl get pod --namespace=kube-system -l k8s-app=kube-router -owide
  11. # output
  12. NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE
  13. kube-router-4f679 1/1 Running 0 2d 192.168.186.4 mykube-k8s-node-nf-2 <none>
  14. kube-router-5slf8 1/1 Running 0 2d 192.168.186.11 mykube-k8s-node-nf-3 <none>
  15. kube-router-lb6k2 1/1 Running 0 20h 192.168.186.14 mykube-k8s-node-nf-6 <none>
  16. kube-router-rzvrb 1/1 Running 0 20h 192.168.186.17 mykube-k8s-node-nf-4 <none>
  17. kube-router-v6n56 1/1 Running 0 2d 192.168.186.6 mykube-k8s-node-nf-1 <none>
  18. kube-router-wwhg8 1/1 Running 0 20h 192.168.186.16 mykube-k8s-node-nf-5 <none>
  19. kube-router-x2xs7 1/1 Running 0 2d 192.168.186.10 mykube-k8s-master-1 <none>
  20. ```
  21. * Peek at kube-router container logs:
  22. ```ShellSession
  23. # From the CLI
  24. kubectl logs --namespace=kube-system -l k8s-app=kube-router | grep Peer.Up
  25. # output
  26. time="2018-09-17T16:47:14Z" level=info msg="Peer Up" Key=192.168.186.6 State=BGP_FSM_OPENCONFIRM Topic=Peer
  27. time="2018-09-17T16:47:16Z" level=info msg="Peer Up" Key=192.168.186.11 State=BGP_FSM_OPENCONFIRM Topic=Peer
  28. time="2018-09-17T16:47:46Z" level=info msg="Peer Up" Key=192.168.186.10 State=BGP_FSM_OPENCONFIRM Topic=Peer
  29. time="2018-09-18T19:12:24Z" level=info msg="Peer Up" Key=192.168.186.14 State=BGP_FSM_OPENCONFIRM Topic=Peer
  30. time="2018-09-18T19:12:28Z" level=info msg="Peer Up" Key=192.168.186.17 State=BGP_FSM_OPENCONFIRM Topic=Peer
  31. time="2018-09-18T19:12:38Z" level=info msg="Peer Up" Key=192.168.186.16 State=BGP_FSM_OPENCONFIRM Topic=Peer
  32. [...]
  33. ```
  34. ## Gathering kube-router state
  35. Kube-router Pods come bundled with a "Pod Toolbox" which provides very
  36. useful internal state views for:
  37. * IPVS: via `ipvsadm`
  38. * BGP peering and routing info: via `gobgp`
  39. You need to `kubectl exec -it ...` into a kube-router container to use these, see
  40. <https://www.kube-router.io/docs/pod-toolbox/> for details.
  41. ## Kube-router configuration
  42. You can change the default configuration by overriding `kube_router_...` variables
  43. (as found at `roles/network_plugin/kube-router/defaults/main.yml`),
  44. these are named to follow `kube-router` command-line options as per
  45. <https://www.kube-router.io/docs/user-guide/#try-kube-router-with-cluster-installers>.
  46. ## Advanced BGP Capabilities
  47. <https://github.com/cloudnativelabs/kube-router#advanced-bgp-capabilities>
  48. If you have other networking devices or SDN systems that talk BGP, kube-router will fit in perfectly.
  49. From a simple full node-to-node mesh to per-node peering configurations, most routing needs can be attained.
  50. The configuration is Kubernetes native (annotations) just like the rest of kube-router.
  51. For more details please refer to the <https://github.com/cloudnativelabs/kube-router/blob/master/docs/bgp.md.>
  52. Next options will set up annotations for kube-router, using `kubectl annotate` command.
  53. ```yml
  54. kube_router_annotations_master: []
  55. kube_router_annotations_node: []
  56. kube_router_annotations_all: []
  57. ```