Step 2: Harden access and establish node baselines
This step should take approximately 30 to 40 minutes.
Overview
You will make SSH key access, time, updates, and firewall policy predictable before Kubernetes introduces more moving parts. Keep a second SSH session open when changing SSH or firewall rules.
Practice the skill
-
Install your administrator public key and test it in a second terminal.
ssh-copy-id admin@lab-01 ssh admin@lab-01 'id && hostname'Repeat for each node. Only after key login works, edit
/etc/ssh/sshd_config.d/10-homelab.confto setPasswordAuthentication noandPermitRootLogin no, then validate and reload SSH:sudo sshd -t sudo systemctl reload ssh -
Enable automatic security updates, then document the maintenance window rather than assuming reboots never happen.
sudo apt install --yes unattended-upgrades sudo dpkg-reconfigure --priority=low unattended-upgrades -
Enable only the firewall rules required for your management network and K3s. The exact ports depend on your CNI and chosen add-ons. Start from the K3s networking requirements, restrict SSH to your management subnet, and permit the K3s server and pod-network traffic only between the three node addresses. Verify from another machine before making the firewall persistent.
-
Confirm time and name resolution from every node.
for host in lab-01 lab-02 lab-03; do getent hosts "$host" ping -c 1 "$host" done timedatectl status -
Create a break-glass record outside the cluster: node addresses, console access method, encrypted SFTP key backup, K3s server token recovery location, and GitHub repository URL. Do not store the only copy in the cluster you may need to rebuild.
What you learned
- Remote administration needs a verified recovery path before it is restricted.
- Clock synchronization and stable internal DNS are functional Kubernetes dependencies.
- Firewall policy belongs to the host boundary as well as Kubernetes NetworkPolicies.
Continue learning
Continue to Step 3: Create the three-server K3s control plane.
Step 1: Plan the cluster and prepare Debian hosts
Establish the failure domains, address plan, storage roles, and repeatable Debian 13 baseline for three bare-metal nodes.
Step 3: Create the three-server K3s control plane
Build an embedded-etcd K3s control plane with three Debian servers and verify quorum plus snapshot recovery inputs.