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.

43 lines
1.3 KiB

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