Preparing Linux nodes for Kubernetes before the first install
Node preparation decides whether your first cluster install is a short exercise or a week of debugging. Before you run kubeadm, RKE2, K3s, Kubespray or any other installer, every node needs a kernel and cgroup setup the kubelet can use, swap handled the way your chosen distribution expects, a unique hostname, product UUID and MAC address, the required ports open between nodes, and time sync that keeps certificates and etcd consistent. The platform team usually owns these settings, while the infrastructure team owns the hardware, virtual machine templates and network paths that feed them. Settle that split in writing before the first node boots, because the gaps tend to appear during preflight checks, not during design reviews. Kubernetes is licensed under Apache 2.0 and ships roughly three minor releases a year, so the nodes you build now will be upgraded many times. Build them from a repeatable template or automated process, not by hand.
Your OS choice sets how much of this work you do by hand. A general-purpose Linux distribution gives your team familiar tooling, package management and the ability to adjust kernel parameters, sysctl settings and firewall rules directly over SSH, but every node becomes a configuration drift risk that your automation must control. An immutable operating system such as Talos Linux removes the shell and manages the machine through an API, which narrows the drift problem but changes how your operators troubleshoot and patch. Confirm with your distribution's documentation which kernel version, cgroup mode and container runtime it supports, rather than assuming a general-purpose image matches it. Ask your vendor or integrator to state those requirements against the exact OS release you plan to standardize on.
Before any node joins a cluster, run the preflight checks your installer provides and keep the output as evidence. Verify that the kubelet can use cgroup v2, that the kernel meets the minimum your distribution documents, that swap is either disabled or explicitly supported, that the hostname and product UUID differ across nodes and that required ports such as 6443 for the API server are reachable from every node that needs them. Check NTP or chrony synchronization on every node, not just on the first control plane host. Record the template version, kernel and package set for each node so that a later upgrade can be compared against a known baseline. Tests like these are cheap to repeat and expensive to skip.
Choosing a general-purpose OS or an immutable OS such as Talos
A general-purpose distribution, such as a mainstream enterprise or community Linux release, is installed, configured and patched the way most server fleets already are. Administrators log in over SSH, apply configuration with tools such as Ansible, Puppet or Chef, and install packages from vendor repositories. Kubernetes prerequisites like kernel modules, sysctl settings, the container runtime and the kubelet packages are added as ordinary host configuration. This model suits teams that already run Linux fleets and have tested change processes for them.
- Patching workflow: Security updates for the kernel, OpenSSL and system libraries arrive through the distribution's package manager, so a node needs a rolling drain, patch, reboot and rejoin cycle that your team schedules.
- Configuration drift: Nodes can diverge through manual changes, so you need configuration management that is enforced and a way to detect drift.
- Skills needed: Your operators need Linux administration, package management, systemd troubleshooting and the configuration tool you choose.
- Audit and access: Interactive shell access is available, so you must control SSH keys, sudo rights and session logging, and feed those logs into your central audit pipeline.
- Best fit: Teams with an established Linux standard, existing automation and a need to run the same host tooling for Kubernetes and non-Kubernetes workloads.
Before you commit, confirm which distribution, kernel and support lifecycle your organization already certifies, and which cgroup and kernel settings your chosen Kubernetes distribution expects.
An immutable operating system, such as Talos Linux, ships a minimal read-only root filesystem and has no interactive shell. Nodes are configured through a declarative machine configuration and managed through an API, and the OS and Kubernetes components are upgraded as a unit rather than by installing packages on each host. The topic of the sibling page on Talos covers the product details. The decision here is about the operating model and what your team must change to run it.
- Patching workflow: OS upgrades are performed as image-level upgrades through the API, so patch cadence follows the platform's release process rather than your package schedule.
- Skills needed: Operators need to think in declarative configuration, API calls and cluster-level recovery, and they lose the habit of fixing a node by logging in.
- Audit and access: With no shell, access control is centred on API credentials and certificates, and every change is a configuration event that is easier to review and reconstruct.
- Troubleshooting: Diagnostics depend on the API, logs and cluster tooling, so you must confirm which debugging tools your monitoring stack needs and how they reach the node.
- Best fit: Teams that want a smaller host attack surface, consistent node state and API-driven operations, and that accept a change in daily habits.
Confirm with the vendor which features your edition provides, which support tiers exist, and how your existing security tools such as endpoint agents, file integrity checks and host scanners behave on a read-only system.
Node settings and when each choice fits
This table compares the node settings that matter before kubeadm, RKE2, K3s or Talos installs a cluster, covering what each setting controls, when it fits and what to confirm. Read it per node role and per distribution, because the defaults and supported values differ between installers. The main takeaway is that most failed installs trace back to a few mismatched settings, so verify them on every node before the first join.
| Setting | What it controls | When it fits | What to confirm |
|---|---|---|---|
| cgroup driver | How the kubelet and container runtime manage resource limits for pods, through cgroup v1 or v2 | Use cgroup v2 on hosts with a recent kernel. Set the kubelet and runtime to the same driver, typically systemd on systemd-based distributions. | Kernel version supports cgroup v2, runtime and kubelet cgroup driver match, and the distribution's documented default for your Kubernetes release |
| Swap | Whether the kubelet tolerates swap memory on the node, which affects scheduling and memory accounting | Disable swap for a default kubeadm install. Enable it only if your Kubernetes version and kubelet configuration explicitly support it. | Swap status on each node, the kubelet swap setting, and whether your distribution's installer disables or manages swap for you |
| Hostname and machine-id | Node identity in the API and in host-level identifiers used by components and certificates | Give every node a unique hostname and a unique machine-id, especially when nodes are cloned from one template image. | Duplicate values across cloned VMs or images, and whether your DNS and certificate SANs match the chosen names |
| product_uuid | A hardware identifier the kubelet reads to tell nodes apart in some setups | Check it on cloned virtual machines, where hypervisors may repeat the value across nodes. | Uniqueness on every node, and the hypervisor option that regenerates it for cloned guests |
| Required ports | Network reachability for the API server, etcd, kubelet and worker traffic between nodes | Open the control plane API port 6443 for the load balancer and nodes, then open the remaining control plane and worker ports listed for your installer. | Full port list for your distribution and CNI, host firewall rules, and load balancer health checks on 6443 |
| Time sync (NTP or chrony) | Clock agreement across nodes, which affects certificate validity, leader election and etcd health | Run one time service on every node, pointing to the same internal or approved time sources, in all environments including air-gapped networks. | Active sync status on each node, chosen time source reachable from the network, and the service your base OS ships by default |
| Kernel modules | Modules loaded for container networking and filtering, such as the bridge and overlay modules | Load bridge and overlay modules at boot on every node, using the list your installer or CNI documents. | Module list for your chosen CNI and runtime, and that modules persist across reboots |
| Sysctls for bridged traffic | Whether bridged IPv4 and IPv6 traffic passes through iptables rules, and IP forwarding for pod traffic | Enable the bridge netfilter and IP forwarding settings on every node so that pod and service traffic is filtered and routed correctly. | Values persist in sysctl configuration files, and the CNI's documented requirements are met before joining nodes |
| Node OS model | Whether nodes run a general-purpose Linux distribution with package management or an immutable OS managed through an API | Choose a general-purpose OS when your team already patches and audits Linux hosts. Choose an immutable OS when you want API-only node management and fewer host changes. | Support matrix for your Kubernetes version, patching and kernel update process, and how your security team verifies host configuration |
Preparing each node in order
This sequence takes a set of bare Linux hosts from an unknown state to nodes that meet the kubelet's prerequisites, can reach each other and the control plane endpoint, and report consistent time, so the cluster installer can run without surprises.
Choose the operating system and image baseline
Decide between a general-purpose Linux distribution and an immutable option such as Talos Linux before anything is installed, because the choice changes how every later step is performed. Build one golden image or kickstart profile per node role, pin the kernel and package versions, and record them in your configuration management. Done means every node in a role boots from the same image and the reader can list the exact OS release and kernel version for each role. Confirm with your distribution vendor and your Kubernetes distribution's support matrix which OS versions it certifies.
Verify kernel version and cgroup v2
Confirm each node runs a kernel at or above the version your chosen Kubernetes release and container runtime require, and that cgroup v2 is the active hierarchy. On each node, run
uname -rto read the kernel andstat -fc %T /sys/fs/cgroup/to check the filesystem type, wherecgroup2fsmeans cgroup v2 is mounted. Also confirm the kubelet and runtime will use the systemd cgroup driver so both agree. Done means every node returns the expected kernel andcgroup2fs, and the runtime and kubelet configurations name the same driver. Check the kernel minimum in your chosen distribution's documentation, since requirements vary by release.Disable swap on every node
Turn off swap at runtime with
swapoff -aand remove or comment out swap entries in/etc/fstabso it stays off after reboot. Disabling swap is the default expectation for kubelet configurations, and any exception must be a deliberate, documented setting in the kubelet configuration, not an accident of the host. Done meansswapon --showreturns no output andfree -hreports zero swap on every node after a reboot test. Confirm with your installer's documentation whether it fails preflight checks when swap is present and how it expects that to be handled.Set unique hostnames, machine IDs and MAC addresses
Give each node a unique hostname, and confirm
/etc/machine-idand the product UUID differ between nodes, which often happens when VMs are cloned from one template. Duplicate values can cause nodes to register under the same identity or confuse CNI and storage components. Runcat /etc/machine-idandsudo cat /sys/class/dmi/id/product_uuidon each node, and check MAC addresses withip link. Done means every node returns distinct values, and the reader has a recorded inventory mapping hostnames to IP addresses. Regenerate identifiers on cloned images before first boot if they are duplicated.Open required ports and the load balancer path
Open the ports the control plane, kubelet and workers need between nodes, then confirm the control plane endpoint path. Kube-apiserver should be reachable on TCP 6443 through the load balancer in front of the control plane nodes, and each control plane node should answer on that port. Check that your firewall or host rules allow the kubelet, etcd and CNI traffic your chosen installer and network plugin require, since the exact list depends on those choices. Verify with
nc -zv <lb-address> 6443from a worker node and from an administrator workstation, and expect a successful connection once the API server is running. Done means the reader has a tested path, not just a written rule.Configure time synchronization
Point every node at the same internal time source using chrony or systemd-timesyncd, and confirm the clock is synchronized before installation. Certificates, token validity and etcd leader election all depend on consistent time, so skew is a common source of hard-to-diagnose failures. Run
chronyc trackingortimedatectl statuson each node andchronyc sourcesto confirm they reference the same upstream servers. Done means every node reports synchronized, and the sources list is identical across the fleet. Ask your infrastructure team which internal NTP sources are approved for the environment.Load kernel modules and set sysctl values
Load the kernel modules and apply the sysctl settings the container runtime and cluster networking expect, including bridged traffic handling and IP forwarding. Persist them in files under
/etc/modules-load.d/and/etc/sysctl.d/so they survive reboots. The exact modules depend on your network plugin and runtime, so take the list from your installer's prerequisites. Verify withlsmodfor the expected modules andsysctl net.ipv4.ip_forwardplus the bridge settings, which should read 1. Done means the values persist after a reboot test on at least one node per role.Run preflight checks and record the baseline
Run your installer's preflight checks on every node, and keep the output as the baseline for the build. Kubeadm, RKE2, K3s, Kubespray and Talos each expose different checks, so use the tool your team has chosen rather than a generic script. Fix every failure before any control plane node is initialized, and store the results with the configuration in version control. Done means every node passes preflight with no unresolved warnings you have not accepted in writing, and the reader can show the recorded output to an auditor or colleague.
How node checks gate the cluster install
The path starts with a base OS image and moves through kernel and cgroup checks, then swap and host identity settings, then port and time checks. Each stage must pass before the next runs. Preflight checks run once the node is prepared, and only a clean preflight allows the node to join the cluster. A failed check sends the node back to the base image or settings, not forward into the cluster. Use the diagram to see which checks sit before preflight, so a failure is fixed on the node rather than inside Kubernetes.
Node checks must pass in order before a node can join the cluster.
Node security and operational risks to plan for
Most node problems in a Kubernetes cluster start before kubeadm, RKE2 or K3s runs, in cloned images, default swap settings and hosts that nobody owns after handover. Each card below names one risk, the control that closes it and the team that should hold that control.
Duplicate host identifiers
Nodes cloned from one template often share the same machine ID, hostname or product UUID, and the kubelet registers each node under its hostname. Two nodes with the same name can overwrite each other's Node object, and cloud or vSphere integrations may attach the wrong volumes. Regenerate /etc/machine-id and set a unique hostname during image build or first boot, then check kubectl get nodes after every join. Owner: the platform engineering team that builds the node image.
Swap hiding memory pressure
Swap lets a node keep running under memory pressure, so the kubelet can report healthy while pods slow to a crawl and etcd latency rises. Kubernetes has historically required swap to be disabled, and the kubelet's handling of swap has changed across releases, so confirm the behavior for your target version before deciding. Record the swap setting in the node image and in the kubelet configuration, not in a one-off shell session. Owner: the platform team, with the operations team confirming memory alerts.
Unmanaged SSH access on general-purpose nodes
A general-purpose OS usually has SSH enabled, local accounts and package managers that let administrators change the node by hand. Each manual change is a source of drift and a path to credentials that sit outside your identity provider. Restrict SSH to named administrators through a bastion or your directory, disable password logins, log sessions and remove shared accounts. Immutable systems such as Talos remove shell access by design, which changes the operating model. Owner: the security team sets the access policy and the operations team runs it.
Drift between nodes
Nodes that were built at different times, or patched by hand, end up with different kernel versions, sysctl values, cgroup settings and container runtime versions. A pod that runs on one node can fail on another for reasons that are hard to trace. Keep one node image or one configuration management role per node type, and compare kernel, runtime and sysctl output across the pool before and after each change. Owner: the platform team owns the baseline and the change record.
Unpatched kernels and runtimes
A node kernel and container runtime carry their own security fixes, and they are not updated when you upgrade Kubernetes alone. Plan a patch cadence for the operating system, kernel and runtime, and drain each node before a reboot so workloads move cleanly. Confirm which kernel versions your chosen Kubernetes release supports, since the kernel requirements for cgroup v2 and other features are stated in the release documentation. Owner: the operations team owns patching, with security reviewing exceptions.
Time skew affecting certificates and etcd
Kubernetes certificates have validity windows, and etcd uses timestamps and leader election timeouts that assume nodes agree on time. A node that drifts can fail TLS handshakes, report certificates as not yet valid and cause control plane instability. Run one time synchronization service on every node, point all nodes at the same internal time sources and alert on offset. Check the service on each node during preparation, not only after an incident. Owner: the infrastructure team owns the time sources and the platform team owns the alerts.
Questions teams ask before preparing nodes
Can our own team prepare Kubernetes nodes without a partner?
Yes, many teams prepare nodes in-house, and the work is mostly repeatable Linux administration: a consistent base image, kernel and cgroup settings, swap handling, unique host identifiers, time sync, firewall rules for the required ports and the container runtime. The harder part is consistency across every node and documenting the result so it can be rebuilt. Teams with a Linux automation practice and a clear build checklist usually handle a small pilot cluster well. A partner tends to help when the node count is high, the environment is air-gapped, or auditors will review the baseline and need evidence. Confirm the kernel and cgroup v2 requirements against the version of Kubernetes you plan to install before you standardize the image.
What drives the effort of preparing nodes?
Effort scales with four main factors:
- Node count and roles, since control plane, worker and edge nodes each need the same baseline with different sizing and placement.
- OS mix, because every distribution, kernel version and package source adds a separate build and test path.
- Air-gapped delivery, which requires an internal package mirror and an image registry before any node can be built.
- Hardening baseline, such as the CIS Kubernetes Benchmark profile your organization adopts, which adds configuration and evidence work.
Ask the partner or your team to list each factor explicitly in the scope so the estimate reflects your actual environment.
What does a fixed-scope node preparation engagement include?
A fixed-scope engagement usually covers a written inventory of nodes and roles, a reference build for the chosen OS, the kernel, cgroup and swap settings, unique hostnames and machine IDs, time synchronization, firewall rules for the ports Kubernetes needs, and a repeatable build process such as Ansible or image templates. It should also include verification steps on each node, a handover document and the agreed number of test rebuilds. Deliverables, exclusions and timelines should be agreed in writing before work starts. Ask whether the scope includes the container runtime, package mirrors and evidence for compliance reviews, because those items are often assumed rather than stated.
How long does node preparation take?
Duration depends on factors you control: the number of distinct OS images, whether hardware is racked and reachable, how quickly network and firewall changes are approved, whether an internal package and image mirror already exists, and how many rounds of testing your change process requires. A single-OS pilot on prepared hardware moves much faster than a mixed fleet across data centers or air-gapped sites. Ask for a timeline that lists each dependency and the party responsible for it, and confirm the change windows needed for each rebuild. Because no duration figure is supplied for this topic, treat any number in a proposal as something to verify against your own dependencies.
What must we supply before node preparation starts?
Plan to provide hardware or hypervisor access, the OS installation media or approved base images, the package and container image sources your environment permits, and a network plan covering addressing, DNS, NTP sources, firewall policy and the ports Kubernetes requires. You also need named approvers and change windows for node rebuilds, plus access to your identity and secrets systems if the build uses them. For air-gapped sites, confirm how images and packages will be transferred and who owns the internal registry. Missing inputs are the most common cause of delayed node builds, so agree on a checklist before the engagement begins.
When does an immutable OS reduce ongoing work?
An immutable operating system such as Talos Linux reduces ongoing work when your team wants fewer host-level changes to manage. With an immutable OS, nodes are configured through an API rather than by logging in, updates replace the whole image, and configuration drift is easier to prevent. This tends to suit teams that run many similar nodes and want consistent patching. A general-purpose OS fits better when your staff depend on SSH access, existing configuration management, vendor agents or specific kernel modules that the immutable image does not provide. Before choosing, confirm which tools your security and operations teams require on the host and how they will operate nodes without a shell.
Which Kubernetes version should we prepare nodes for?
Prepare nodes for a Kubernetes minor version that is still supported at the time you build, because kubelet and kube-apiserver must stay within the version skew policy. The Kubernetes project maintains the three most recent minor releases, and patch support for each runs for about one year. Choose the version from the releases page on the day of your build, then check the kernel, cgroup and runtime requirements for that version. If you expect to upgrade within the year, leave room in the plan for the next minor release.
How node preparation affects upgrades and day-two work
Node preparation decides how painful the next Kubernetes minor upgrade will be. The version skew policy lets kubelets run up to three minor versions behind kube-apiserver, but it requires the control plane to move first and only one minor version at a time. That means every node must be ready to accept a new kubelet on a predictable schedule. The Kubernetes project ships releases about three times per year on a cycle of roughly 14 weeks, so a cluster that is left alone will fall out of support within a few upgrade windows. Nodes that were configured by hand, with different kernel parameters, swap settings or runtime versions, turn each upgrade into a set of one-off investigations. Nodes built from the same baseline let you upgrade a control plane, then a small pool of workers, and roll back a single node if a change misbehaves.
Keep node images reproducible by treating the operating system build as code. Record the kernel version, cgroup v2 status, swap state, /etc/machine-id generation, time synchronization service, container runtime version and the exact package set in a version-controlled definition, whether that is a cloud-init template, an image pipeline or an Ansible role. Rebuild images from that definition rather than patching live hosts, and store the resulting image identifiers alongside the Kubernetes version they were tested with. Confirm with your OS vendor which kernel line is supported for your chosen Kubernetes release, since the minimum kernel requirement is set by Kubernetes documentation and should be checked against the version you plan to run.
Write down a preflight baseline and run it on every node before it joins the cluster and again after each upgrade. A useful baseline checks the items in this topic plus the disk and memory headroom your control plane sizing needs, the reachability of the ports the control plane and kubelet use, and that the clock is synchronized across all nodes. Store the output with the change record so an auditor or on-call engineer can see what the node looked like before it joined. Ask any implementation partner to deliver this baseline as a written artifact, including who owns each check after handover, how drift is detected and how often the checks run. Those answers determine whether later upgrades are routine work or a project.
How DeployOpen prepares nodes for your cluster
Node preparation decides whether every later Kubernetes install, upgrade and security review goes smoothly, so we treat it as its own scoped deliverable. The cards below cover how the work is agreed in writing, where it runs, what gets documented and tested, and how the baseline is kept current after handover.
Written scope before any node is touched
We agree in writing which operating system, kernel line, cgroup mode, swap policy, port set and time source applies to each node role before work starts. The scope also states whether the cluster is general-purpose Linux or an immutable OS such as Talos, because that choice changes who performs OS patching and how node access works. Ask us to show which items are in scope and which remain with your team.
Work inside your own infrastructure
Node preparation runs in your cloud accounts, data centers or air-gapped networks, under your change control and access model. We need agreed access paths, package mirrors or offline bundles for air-gapped sites, and named owners for the hypervisor or bare metal layer. Confirm early which repositories and time sources the nodes can reach, since those constraints shape the entire build sequence.
Documented node baseline
Each node role gets a baseline document covering kernel version, cgroup v2 status, swap state, unique hostname and machine ID, required ports, chrony or systemd-timesyncd configuration and kernel modules. The baseline becomes the reference your team uses when adding nodes later. Ask for it in a form your configuration management tool can consume, so drift can be detected rather than rediscovered during an incident.
Preflight evidence for every node
Before kubeadm, RKE2, K3s or another installer runs, we collect preflight output from each node and record it against the baseline. Checks cover cgroup mode, swap, port reachability between nodes, clock offset and duplicate identifiers. Ask for the evidence bundle as a deliverable, because it is the record a platform reviewer or auditor will ask for when a node fails to join.
Kernel and version alignment
The baseline has to match the Kubernetes minor version you plan to run and the kernel features its runtime and CNI depend on. Kubernetes releases roughly three times per year, so the OS image you choose today will be exercised by later upgrades. We check the kernel line against the supported Kubernetes versions and record the upgrade path for the node OS alongside it.
Version skew policyRetainers for ongoing support
Node baselines drift as patches land, nodes are replaced and new hardware arrives. We offer retainers that cover baseline reviews, preflight checks on added nodes and OS patch planning, priced from the agreed scope. Ask what the retainer excludes, such as hardware failures or application-level issues, so that responsibility is clear before a node problem occurs.

