# Initial Requirements

Basic stuff we need :

* Install a operating system in each of the nodes

* Arrange a ssh connection for the nodes

* Prearrange the nodes for K3s installation

## Installing the OS and arrange an ssh connection to the nodes

Attention: the kubernetes flavor I am going to play with is k3s. After many tests with previous versions of the project, I have come to the conclusion that the best OS version for this is Bullseye. This particular OS variant doesn’t include a desktop environment, thus, SSH will be our primary method for node installation.

![Bullseye1](./images/bullseye1j.jpg)

Before you flash the OS onto the SD Card, it’s crucial to configure the node name and login details for each node.

![Bullseye2](./images/bullseye2j.jpg)

Information and procedure can be followed on the Raspberry Pi official page (link below), simply keep in mind:

[Raspberry pi OS](https://www.raspberrypi.com/software/)

```bash

  # We have to install version 64bits lite (no desktop necessary) `
  # We have to activate ssh connection
  # Important:Tested diverse versions of SO, Debian bullseye seem to be the most suitable

```

### Config static IP for Pi#

By default, Pi OS will use DHCP to receive random Ip from the router, so to ensure the stable connectivity between the node We will config the status IP for each node by using the following steps.

```bash

  # Open the file dhcpcd.conf
  
  sudo nano /etc/dhcpcd.conf
  
  # update the below parameters according to your router ip-address.   
  interface eth0
  static ip_address=192.168.1.85/24
  static routers=192.168.1.254
  # select control + X and save the changes.

``` First, we should confirm that all our nodes are up:

```bash

  #switch to root
  sudo -su
  #install nmap
  apt install nmap
  #scan local network range to see who is up
  nmap -sP 192.168.0.1-254

``` First, prepare /etc/hosts file on the one control node you are on right now:

```bash

  # Edit /etc/hosts with your favorite editor, mine looks like:
  127.0.0.1 localhost
  192.168.0.80 master01 control01.local
  192.168.0.81 worker01 worker01.local
  192.168.0.82 worker02 worker02.local
  192.168.0.83 worker03 worker03.local

```