Skip to main content
Before installing the Kubernetes cluster with Flux, ensure your system meets all prerequisites and has the necessary configurations in place.

System Requirements

This guide is designed for bare-metal Kubernetes clusters running on Linux systems.

Hardware Requirements

  • Control Plane Nodes: Minimum 2 CPU cores, 2GB RAM
  • Worker Nodes: Minimum 2 CPU cores, 2GB RAM (varies by workload)
  • Storage: At least 20GB free disk space per node
  • Network: Static IP addresses for control plane nodes (e.g., 192.168.0.101)

Software Requirements

  • Operating System: Ubuntu 20.04+ or Debian-based Linux distribution
  • Network Access: Internet connectivity for downloading packages
  • Git: For cloning the FluxCD repository
  • GitHub Account: For Flux GitOps integration

System Configuration

Before installing Kubernetes components, several system-level configurations must be applied.

Enable IP Forwarding

1

Configure IP forwarding

IP forwarding is required for Kubernetes networking to function properly.
# Permanent (add to sysctl.conf)
echo "net.ipv4.ip_forward=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
2

Verify configuration

Confirm that IP forwarding is enabled:
cat /proc/sys/net/ipv4/ip_forward
# Should return: 1

Disable Swap

Kubernetes requires swap to be disabled on all nodes. This is a mandatory requirement.
1

Turn off swap immediately

sudo swapoff -a
2

Disable swap permanently

Comment out swap entries in /etc/fstab to prevent swap from re-enabling on reboot:
sudo sed -i '/swap/s/^/#/' /etc/fstab
sudo systemctl mask swap.target
3

Verify swap is disabled

swapon --show
# Should return no output

Configure Containerd

1

Generate default configuration

sudo containerd config default > /etc/containerd/config.toml
2

Enable SystemdCgroup

Edit /etc/containerd/config.toml and set SystemdCgroup = true in the runc options section:
/etc/containerd/config.toml
version = 2

[plugins]

  [plugins."io.containerd.grpc.v1.cri"]

    [plugins."io.containerd.grpc.v1.cri".containerd]

      [plugins."io.containerd.grpc.v1.cri".containerd.runtimes]

        [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]

          runtime_type = "io.containerd.runc.v2"

          [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]

            SystemdCgroup = true
3

Restart containerd

sudo systemctl restart containerd
sudo systemctl enable containerd

Install Required Packages

1

Update system packages

sudo apt-get update
sudo apt-get upgrade -y
2

Install dependencies

# apt-transport-https may be a dummy package; if so, you can skip that package
sudo apt-get install -y apt-transport-https ca-certificates curl gpg

Network Planning

IP Address Allocation

Plan your network IP addresses before installation:
  • Control Plane API Server: 192.168.0.101 (example)
  • Pod Network CIDR: 10.1.0.0/16
  • Service CIDR: 10.96.0.0/12 (default)
Adjust these IP ranges to match your network infrastructure and avoid conflicts with existing networks.

Next Steps

Once all prerequisites are met, proceed to Cluster Installation to install Kubernetes components.

Build docs developers (and LLMs) love