Skip to content

Instantly share code, notes, and snippets.

@tomotake-koike
Last active November 14, 2021 06:55
Show Gist options
  • Select an option

  • Save tomotake-koike/9ab28dde5456d3e5e080444f902c507a to your computer and use it in GitHub Desktop.

Select an option

Save tomotake-koike/9ab28dde5456d3e5e080444f902c507a to your computer and use it in GitHub Desktop.
Setup OKD node with NIC bonding and a fixed IP address assigned without DHCP

Setup OKD node with NIC bonding and a fixed IP address assigned without DHCP

Prerequisite

Please refer to the following until node's live-os booting:
https://itnext.io/okd-4-5-single-node-cluster-on-windows-10-using-hyper-v-3ffb7b369245

I haven't tried, though, and I guess this method is also enable to setup bootstrap server.

Setup OKD Node

  1. Boot live-os of CoreOS with Fedra CoreOS ISO.

  2. At the first of booting live-os, add kernel command line in GRUB edit screen.

    ip=192.168.122.22::192.168.122.4:255.255.255.0:worker-1:bond0:none bond=bond0:eth0,eth1:mode=active-backup nameserver=192.168.122.4
    

    The first parameter is IP address to set to bonding interface, and then this will be set to bridge IF of OVNKubernetes node via OKD installation. About each parameter of Dracut kernel arguments' details refer below: https://docs.fedoraproject.org/en-US/fedora-coreos/sysconfig-network-configuration/#_via_kernel_arguments

  3. Once booted live-os, confirm if the bonding interface is correct.

  4. Execute coreos-install with --copy-network. (On my environment, the load balancer of API servers is simultaneously a web server for providing ignition files.)

  5. Before doing reboot, change hostname of node.

    [core@worker-2 ~]$ sudo -i
    [root@worker-2 ~]# mkdir sda4
    [root@worker-2 ~]# mount /dev/sda4 sda4
    [root@worker-2 ~]# chroot sda4/ostree/boot.1/fedora-coreos/*/0/
    [root@worker-2 ~]# echo $HOSTNAME > sda4/ostree/boot.1/fedora-coreos/*/0/etc/hostname
    [root@worker-2 ~]# umount sda4
    [root@worker-2 ~]# reboot
    
  6. And then do the same procedure with one that appeared from the community step by step.

Note

The cluster built with this tip needs to make sure correct condition via even upgrading node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment