c2sr bootcamp docs Help

Task 1: Control Plane Installation

This guide walks your team through the installation, of a K3s control plane. K3s is a lightweight, certified Kubernetes distribution. By following these steps, you will deploy the core "brain" of your new Kubernetes cluster, ready for worker nodes to join.

Before you start

Ensure your team has met the following prerequisites before beginning the installation.

Make sure that:

  • All participants have switched to the k3s user account (e.g., using sudo su - k3s).

  • A shared screen session has been started by the session leader (e.g., screen -S group_session).

  • All team members have successfully joined the shared screen session.

  • The designated Driver will run the commands, and others will observe.

How to install the control plane

The designated Driver will now execute the following commands. Observers should watch the shared screen and verify the output of each command before proceeding to the next step.

Step 1: Test Direct Internet Access

Ping Google's public DNS server to confirm the device can reach an external IP address. A successful result will show 0% packet loss. This is shown in the expected response.

ping -c 4 8.8.8.8

Expected response:

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=110 time=21.3 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=110 time=21.5 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=110 time=21.5 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=110 time=21.4 ms --- 8.8.8.8 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 21.318/21.441/21.516/0.077 ms

Step 2: Test DNS Name Resolution

Ping a domain name to confirm that the Domain Name System (DNS) is working correctly. This is a critical test to ensure the server can find other computers on the internet by their name.

ping -c 4 google.com

Expected response:

PING google.com (<ip address>) 56(84) bytes of data. 64 bytes from dfw28s26-in-f14.1e100.net (<ip address>): icmp_seq=1 ttl=110 time=21.6 ms 64 bytes from dfw28s26-in-f14.1e100.net (<ip address>): icmp_seq=2 ttl=110 time=21.8 ms 64 bytes from dfw28s26-in-f14.1e100.net (<ip address>): icmp_seq=3 ttl=110 time=21.5 ms 64 bytes from dfw28s26-in-f14.1e100.net (<ip address>): icmp_seq=4 ttl=110 time=21.7 ms --- google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3005ms rtt min/avg/max/mdev = 21.500/21.650/21.800/0.120 ms

Step 3: Update the system

First, ensure all system packages are up-to-date. This prevents conflicts with existing software.

sudo apt update && sudo apt upgrade -y

Step 4: Install k3s

Use the official installation script from k3s. This command downloads and runs the script, which automatically sets up k3s as a systemd service.

curl -sfL https://get.k3s.io \ | INSTALL_K3S_VERSION="v1.30.6+k3s1" \ INSTALL_K3S_EXEC="--node-ip=<device ip addr> --node-name=<name of the control plane node>" \ sh -

Expected response:

[INFO] Using v1.30.6+k3s1 as release [INFO] Downloading hash https://github.com/k3s-io/k3s/releases/download/v1.30.6+k3s1/sha256sum-amd64.txt [INFO] Downloading binary https://github.com/k3s-io/k3s/releases/download/v1.30.6+k3s1/k3s [INFO] Verifying binary download [INFO] Installing k3s to /usr/local/bin/k3s [INFO] Skipping installation of SELinux RPM [INFO] Creating /usr/local/bin/kubectl symlink to k3s [INFO] Creating /usr/local/bin/crictl symlink to k3s [INFO] Skipping /usr/local/bin/ctr symlink to k3s, command exists in PATH at /usr/bin/ctr [INFO] Creating killall script /usr/local/bin/k3s-killall.sh [INFO] Creating uninstall script /usr/local/bin/k3s-uninstall.sh [INFO] env: Creating environment file /etc/systemd/system/k3s.service.env [INFO] systemd: Creating service file /etc/systemd/system/k3s.service [INFO] systemd: Enabling k3s unit Created symlink /etc/systemd/system/multi-user.target.wants/k3s.service → /etc/systemd/system/k3s.service. [INFO] systemd: Starting k3s

Accomplishments

A K3s control plane node has been successfully installed and configured on the system.

K3s Service: K3s version v1.30.6+k3s1 was installed and configured to run as a systemd service, ensuring it will start automatically on boot.

Node Configuration: The node has been configured with the name k3ssubmain and has been assigned its internal IP address for cluster communication.

System Integration: Necessary command-line tools, such as, kubectl have been linked, and the K3s service has been enabled and started. The node is currently initialized.

Remain in the shared terminal session, as this is required for the next Task.

Last modified: 23 June 2025