PXE Ubuntu Installation Feature
The PXE Network Installer is useful when building new nodes from scratch.
Warning
The PXE Network Installer will reformat the host node disk.
In this project Ubuntu is installed onto the node. This is destructive and not to be confused with other PXE configurations where nodes can run Ubuntu from a shared (NFS) network drive.
Host Boot Order
The preferred boot-sequence should be the following order:
- Local Disk
- PXE Network Boot
If you set PXE Network Boot as (1) then the node will continuously network-boot and re-install Ubuntu in an endless cycle.
Fresh Install (no previous OS)
In a fresh-install where no prior OS is installed on the host, (1) will fail and (2) will be attempted. Once the OS is installed, (1) will succeed on a reboot and the node.
Install with previous OS
To add a new node to the cluster it is necessary to interrupt the host computers BIOS and choose Network-Boot (PXE legacy).
How to Perform the PXE Network Installation
- Connect the node to the cluster subnet via the Layer 2 switch.
- Add the new node MAC Address to
gateway-install/defaults/main.yaml
file# Known nodes on cluster network nodes: ... - name: "k8s-control-plane-node" mac: "b8:ae:ed:7e:57:54" static_ip: "192.168.57.31" ...
- Run the Gateway Device Playbook with the
dnsmasq_setup
tag.ansible-playbook -i hosts build-gateway.yaml -K -t dnsmasq_setup
- Power On the new node and ensure it will Network Boot (see below configuration)
- Manually install the Ansible Host ssh-key onto the node. This is done using the Gateway Device as a SSH JumpHost. See example below.
- Run the k8s-install Ansible Playbook to add this node to the k8s cluster.
ansible-playbook -i hosts build-k8s-cluster.yaml -K --extra-vars '{"reset_cluster":False}'
Warning
Ensure you include the reset_cluster: False
otherwise the entire cluster will be
destroyed and re-created.
BIOS PXE Loader Timeout
If the BIOS PXE loader times out unable to start the installation process then check the MAC address and ensure it is provisioned in dnsmasq
service on Gateway Device. There are more troubleshooting details on the Services/DNS/Cluster Network section of this wiki.
SSH JumpHost Example
Where ubuntu@192.168.1.xxx (Gateway Device)
is the Gateway Device Home Network IP address and username is ubuntu
.
ansible-host#> ssh-copy-id -i ~/.ssh/id_rsa.pub -o \
ProxyCommand="ssh -W %h:%p ubuntu@192.168.1.xxx (Gateway Device)" ubuntu@k8s-node2
Note: The Gateway Device ssh-key is installed automatically in the installer.