Nathan Skrzypczak | 9ad39c0 | 2021-08-19 11:38:06 +0200 | [diff] [blame] | 1 | Setting Up a Custom Management Network on Multi-Homed Nodes |
| 2 | =========================================================== |
| 3 | |
| 4 | If the interface you use for Kubernetes management traffic (for example, |
| 5 | the IP address used for ``kubeadm join``) is not the one that contains |
| 6 | the default route out of the host, then you need to specify the |
| 7 | management node IP address in the Kubelet config file. Add the following |
| 8 | line to: (``/etc/systemd/system/kubelet.service.d/10-kubeadm.conf``): |
| 9 | |
| 10 | :: |
| 11 | |
| 12 | Environment="KUBELET_EXTRA_ARGS=--fail-swap-on=false --node-ip=<node-management-ip-address>" |
| 13 | |
| 14 | Example |
| 15 | ------- |
| 16 | |
| 17 | Consider a 2 node deployment where each node is connected to 2 networks |
| 18 | - ``10.0.2.0/24`` and ``192.168.56.0/24``, and the default route on each |
| 19 | node points to the interface connected to the ``10.0.2.0/24`` subnet. We |
| 20 | want to use subnet ``192.168.56.0/24`` for Kubernetes management |
| 21 | traffic. Assume the addresses of nodes connected to ``192.168.56.0/24`` |
| 22 | are ``192.168.56.105`` and ``192.168.56.106``. |
| 23 | |
| 24 | On the ``192.168.56.105`` node you add the following line to |
| 25 | ``10-kubeadm.conf``: |
| 26 | |
| 27 | :: |
| 28 | |
| 29 | Environment="KUBELET_EXTRA_ARGS=--fail-swap-on=false --node-ip=192.168.56.105" |
| 30 | |
| 31 | On the ``192.168.56.106`` node you add the following line to |
| 32 | ``10-kubeadm.conf``: |
| 33 | |
| 34 | :: |
| 35 | |
| 36 | Environment="KUBELET_EXTRA_ARGS=--fail-swap-on=false --node-ip=192.168.56.106" |