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.

51 lines
1.8 KiB

  1. # Flannel
  2. Flannel is a network fabric for containers, designed for Kubernetes
  3. Supported [backends](https://github.com/flannel-io/flannel/blob/master/Documentation/backends.md#wireguard): `vxlan`, `host-gw` and `wireguard`
  4. **Warning:** You may encounter this [bug](https://github.com/coreos/flannel/pull/1282) with `VXLAN` backend, while waiting on a newer Flannel version the current workaround (`ethtool --offload flannel.1 rx off tx off`) is showcase in kubespray [networking test](tests/testcases/040_check-network-adv.yml:31).
  5. ## Verifying flannel install
  6. * Flannel configuration file should have been created there
  7. ```ShellSession
  8. cat /run/flannel/subnet.env
  9. FLANNEL_NETWORK=10.233.0.0/18
  10. FLANNEL_SUBNET=10.233.16.1/24
  11. FLANNEL_MTU=1450
  12. FLANNEL_IPMASQ=false
  13. ```
  14. * Check if the network interface has been created
  15. ```ShellSession
  16. ip a show dev flannel.1
  17. 4: flannel.1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default
  18. link/ether e2:f3:a7:0f:bf:cb brd ff:ff:ff:ff:ff:ff
  19. inet 10.233.16.0/18 scope global flannel.1
  20. valid_lft forever preferred_lft forever
  21. inet6 fe80::e0f3:a7ff:fe0f:bfcb/64 scope link
  22. valid_lft forever preferred_lft forever
  23. ```
  24. * Try to run a container and check its ip address
  25. ```ShellSession
  26. kubectl run test --image=busybox --command -- tail -f /dev/null
  27. replicationcontroller "test" created
  28. kubectl describe po test-34ozs | grep ^IP
  29. IP: 10.233.16.2
  30. ```
  31. ```ShellSession
  32. kubectl exec test-34ozs -- ip a show dev eth0
  33. 8: eth0@if9: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1450 qdisc noqueue
  34. link/ether 02:42:0a:e9:2b:03 brd ff:ff:ff:ff:ff:ff
  35. inet 10.233.16.2/24 scope global eth0
  36. valid_lft forever preferred_lft forever
  37. inet6 fe80::42:aff:fee9:2b03/64 scope link tentative flags 08
  38. valid_lft forever preferred_lft forever
  39. ```