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.5 KiB

  1. Flannel
  2. ==============
  3. * Flannel configuration file should have been created there
  4. ```
  5. cat /run/flannel/subnet.env
  6. FLANNEL_NETWORK=10.233.0.0/18
  7. FLANNEL_SUBNET=10.233.16.1/24
  8. FLANNEL_MTU=1450
  9. FLANNEL_IPMASQ=false
  10. ```
  11. * Check if the network interface has been created
  12. ```
  13. ip a show dev flannel.1
  14. 4: flannel.1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default
  15. link/ether e2:f3:a7:0f:bf:cb brd ff:ff:ff:ff:ff:ff
  16. inet 10.233.16.0/18 scope global flannel.1
  17. valid_lft forever preferred_lft forever
  18. inet6 fe80::e0f3:a7ff:fe0f:bfcb/64 scope link
  19. valid_lft forever preferred_lft forever
  20. ```
  21. * Docker must be configured with a bridge ip in the flannel subnet.
  22. ```
  23. ps aux | grep docker
  24. root 20196 1.7 2.7 1260616 56840 ? Ssl 10:18 0:07 /usr/bin/docker daemon --bip=10.233.16.1/24 --mtu=1450
  25. ```
  26. * Try to run a container and check its ip address
  27. ```
  28. kubectl run test --image=busybox --command -- tail -f /dev/null
  29. replicationcontroller "test" created
  30. kubectl describe po test-34ozs | grep ^IP
  31. IP: 10.233.16.2
  32. ```
  33. ```
  34. kubectl exec test-34ozs -- ip a show dev eth0
  35. 8: eth0@if9: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1450 qdisc noqueue
  36. link/ether 02:42:0a:e9:2b:03 brd ff:ff:ff:ff:ff:ff
  37. inet 10.233.16.2/24 scope global eth0
  38. valid_lft forever preferred_lft forever
  39. inet6 fe80::42:aff:fee9:2b03/64 scope link tentative flags 08
  40. valid_lft forever preferred_lft forever
  41. ```