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.

80 lines
3.5 KiB

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