Skip to content

Instantly share code, notes, and snippets.

@egeneralov
Created May 12, 2021 14:47
Show Gist options
  • Save egeneralov/5dd24718339eee480a84e0eddd972276 to your computer and use it in GitHub Desktop.
Save egeneralov/5dd24718339eee480a84e0eddd972276 to your computer and use it in GitHub Desktop.

cilium kubespray direct routing

Tested on kube-sigs/kubespray commit a923f4e7c0692229c442b07a531bfb5fc41a23f9.

  • Add enable-endpoint-routes: "true" at EOF kubespray/roles/network_plugin/cilium/templates/cilium-config.yml.j2
  • Modify kubespray inventory group_vars/k8s-cluster/k8s-net-cilium.yml
cilium_auto_direct_node_routes: true
cilium_native_routing_cidr: 10.10.2.0/24
cilium_tunnel_mode: disabled
  • presented above 10.10.2.0/24 - it's lan ips dedicated to k8s cluster only
    • if you use some resources in your lan network you must provide the same routes on non-k8s machines (via systemd-networkd, for example).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment