Setting up lightweight Kubernetes (k3s) for edge/IoT

Objects are scattered across regions, connectivity and power are unstable — a standard on-site cluster cannot be deployed. We set up turnkey lightweight Kubernetes for the edge: it runs on weak hardware, survives connectivity outages, and is managed from a single center. Engineer site visits are reduced severalfold, and updates reach all sites overnight.

Our competencies:

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1365
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1330
  • B2B Advance company logo design
    B2B Advance company logo design
    776
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1077
  • AIDER company logo development
    AIDER company logo development
    1022
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1113

k3s for the edge: where the classic cluster breaks

An edge cluster differs from a data center one not in size but in conditions: nodes sit at sites without an on-duty engineer, and the link to them is mobile or congested. A full control plane with quorum requires stable connectivity and predictable latency. When there are dozens of sites rather than three, this difference turns into constant failures.

Loss of communication with a site looks harmless for the first minutes, and then the node loses its liveness signal, drops out of the cluster, and the scheduler moves workloads to another site — often one that physically cannot serve them.

Local automation stops along with them, and after the channel is restored the state has already diverged and some services have to be brought up manually.

Manual node updates add a second layer of problems: versions diverge between sites, configurations drift, and each update is a coordinated window and a site visit. A site failure in such a scheme means a long recovery: while the engineer gets to the location, the process is down.

We break down how this is addressed. The lightweight distribution k3s keeps the control plane as a single process at the site itself, stores state locally, and sends it to the center when connectivity returns.

The node survives an outage autonomously, and updates are rolled out centrally, without site visits.

What a lightweight cluster at remote sites provides

A lightweight cluster at a site is a local control part that keeps the service description locally, not in the central control plane.

While the channel is fine, the site receives updates from the shared repository; when the channel disappears, the site continues to operate on the last accepted configuration.

Local images reside on the node, so restarting a service after a power outage or failure does not depend on downloading from the network.

Unified update delivery removes the main cost item — visits to each site. The deployment description is the same for all sites, differences go into variable values specific to the point: sensor addresses, limits, schedules.

A new version is rolled out in waves, rollback to the previous one is a return to the previous description, without manual editing of configurations on site. The share of updates delivered remotely stops depending on geography.

Reducing downtime comes from reconciling actual state with desired state. A crashed process is brought up on the node by itself, a failed node is excluded from service, and its load is redistributed.

Readiness checks do not let traffic into a service that has not warmed up yet, and resource limits prevent one task from consuming the whole site.

Recovery after a failure relies on the fact that the site state is stored on the node disk.

After power-on, the cluster comes up without an external network and brings services to the desired state; replacing equipment comes down to connecting a new node, which receives the description and images itself. The time to return a site to service is measured in minutes, not an engineer visit.

This should be checked by four numbers: the share of time the site operates autonomously, the share of updates without a visit, recovery time after node failure, and service return speed after a restart.

k3s deployment modes: single node or cluster

The deployment mode in k3s is chosen before installation: converting a single node into a fault-tolerant cluster at a site without reinstalling the control layer is almost impossible.

The difference is not in load, but in where the control layer state is stored and how many nodes must remain connected simultaneously.

Option When it fits Limitations
Single node, embedded storage One site, a dozen services, downtime for reboot is acceptable No quorum: node failure stops control until recovery from backup
Single node, external database Predictable state backup and migration to new hardware are needed The database becomes a second point of failure; it is backed up separately
Cluster of three control nodes Downtime is unacceptable, the channel between nodes is stable An odd number of nodes is mandatory; if connectivity breaks, the control layer stops accepting changes
Cluster with distributed storage Roles are spread across sites, workload migration is needed Harder to commission, sensitive to latency and packet loss

Connectivity requirements are set by quorum: control nodes exchange confirmations constantly, so low and predictable latency is needed between them.

At a site with mobile internet or a backup radio channel, quorum falls apart with every burst of loss — there a single node with regular state backup is more reliable than a formally three-node cluster.

Site limitations are checked first: available power, cabinet space, the ability to bring in a second channel. If these conditions are absent, plan a single node and treat recovery from a copy as a standard scenario, not as an emergency.

k3s implementation: work stages from audit to handover

We conduct k3s implementation as a sequence of stages, where each ends with an artifact for approval. This way the discrepancy between the project and the actual state of the site is exposed at the design stage, not during commissioning.

  1. Infrastructure audit. We survey the sites: equipment, power, temperature conditions, communication channels, and access. The output is a node map: which are suitable for control roles, and which only for worker roles.

  2. Cluster design. We determine the number of control and worker nodes, placement of the local image registry, the order of updates and state backup. We record which failures the site survives on its own.

  3. Node configuration. We prepare the operating system, network interfaces, local storage, and roles; we describe installation with templates so that a new site comes up repeatably.

  4. Deployment and workloads. We deploy the cluster, configure the internal network, access policies, and resource separation, and connect monitoring and log collection.

  5. Acceptance checks. We run failure scenarios: node shutdown, loss of communication with the center, site reboot, application update and rollback. We agree acceptance conditions in advance.

  6. Handover to operation. We provide documentation and procedures, train your team, transfer access, and configure incident notifications.

After handover, we stay in touch and support the first updates until the on-call team gains confidence.

What the customer receives after implementation

Implementation is closed not when the cluster is up, but when your team can update, diagnose, and recover it without us.

Therefore, along with the working k3s environment, we hand over a set of operational artifacts in the same repository where the configuration resides — documentation does not diverge from the actual state.

  • Documentation set: description of the environment architecture, list of nodes and their roles, rationale for the chosen mode — one site or several, embedded state storage or an external database, where fault-tolerance boundaries lie.
  • Network and node diagrams: topology of communication between edge sites and the center, addressing and subnets, egress points, placement of agents on devices, and site behavior when the communication channel is lost.
  • Access policies: team roles and permissions, procedure for issuing certificates and tokens to new nodes, environment separation, restriction of access to the API server and secret storage.
  • Update procedure: sequence for rolling out a new cluster and application version, maintenance windows, phased rollout to part of the sites, rollback criteria, and a list of post-update checks.
  • Recovery procedure: procedure for returning a failed node and an entire site to service, composition of state and configuration backups, target recovery time.
  • Operations instructions: typical operations — adding a node, certificate rotation, reading logs, taking metrics — and analysis of common failures with first diagnostic steps.
  • Configurations and automation: declarative resource descriptions in the version control system, node installation scripts, and reproducible environment bring-up from scratch in one run.

Case: 40 sites on one control environment

The customer is a network of 40 distributed sites: warehouses and service points, each with its own node running local services.

Before the project, configurations diverged: some sites ran old builds, updates were done by an engineer visit, and a node failure meant downtime until a specialist arrived.

Measurements before and after

Metric Before After
Sites with a unified configuration 22 of 40 40 of 40
Updating one site 40–60 minutes manually 3–5 minutes from the shared environment
Recovery after node failure 2–4 hours with a visit 10–15 minutes automatically
Engineer visits per month 10–14 1–2
Share of manual operations during deployment about 80% about 10%

At each site we deployed k3s — a lightweight Kubernetes that runs local services on the site's weak hardware.

Configurations were moved to a shared repository: the site state is described declaratively, and divergence from it is removed automatically, without manual edits on site.

Updates go in waves of five sites with state checks after each wave and automatic rollback to the previous build on failure.

A failed node is recreated by itself: services come up from the saved description, and the engineer joins the analysis after the fact, rather than instead of the system.

A new site is now commissioned from a template: connection to the environment and the first working configuration take about an hour instead of several days of approvals and visits.

How does k3s differ from classic Kubernetes?

k3s is the same Kubernetes API and the same set of abstractions, but assembled into one process instead of five services.

In a classic distribution, you separately deploy quorum state storage, control components, and an agent on each node; here storage is embedded, and certificates and links between components are generated at startup.

Manifests and workloads migrate almost without edits — what changes is the method of delivery and operation, not the application description model.

The difference in resource consumption is an order of magnitude.

The control plane of a classic cluster needs dedicated machines and headroom for state storage; k3s fits within the resources of one compact node and comes up in seconds, so it is installed directly on a gateway next to the equipment. What is cut down is what the data center needs, not what the application needs.

Behavior during loss of communication is the key difference for sites. The channel to the control plane disappears: workloads continue to run on local state, configuration changes wait for restoration and are applied by reconciliation when it returns.

In a cluster with external quorum storage, loss of communication with it stops changes and brings down the manageability of the entire site, which is unacceptable at a site with an unstable channel.

Operation at a site is simpler: the node is updated by replacing the image, state is migrated with a snapshot, rollback is restoration of the snapshot, and diagnostics are viewed in one process instead of five.

The flip side is that some familiar add-ons and network policies will have to be configured separately.

Platform choice depends on scale: hundreds of nodes, multi-tenancy, and fine-grained network policies mean classic Kubernetes in a managed form; a few or dozens of nodes at sites where autonomy and predictable updates matter more mean k3s.

Common technical questions about implementation

During approval, installation is almost never discussed — the questions concern operation: what happens when a site loses connectivity, how to update the fleet without stopping services, who reads logs from distributed nodes. Below are answers to what the customer's engineers raise most often.

Will a cluster at a remote site continue to work without the internet?

Yes. The k3s control layer runs locally on the node itself, state is stored on disk, so the site brings services up after a reboot without an external network.

We keep images in a local registry next to the cluster — a new version is rolled out on site rather than pulled from external storage.

How to update without stopping the service?

We drain nodes one by one: exclude from balancing, wait for active connections to close, update, and return. The disruption budget rule prevents taking down more than one copy of a service, and the readiness check returns the node to service only after the workload starts. Rollback is switching to the previous image; it remains in the local registry.

How protected is the cluster at the site?

Communication between nodes uses mutual authentication, service certificates are short-lived and rotate automatically. We grant service account permissions on a least-privilege basis, store secrets separately from code, and network policies restrict connections between services. We separately secure physical access to the storage device at the site.

How to collect logs and metrics with unstable connectivity?

The collector writes to a local disk buffer and sends packets when the channel appears — an outage does not lead to loss of records. Node and service metrics follow the same path, and an alert on site unavailability triggers before the user learns about the failure.

Let's discuss your task and come back with a plan

For the scope estimate to be based on facts rather than guesses, we need to understand the physics of your sites: how many nodes are at each, what communication channels exist between them, whether there are power constraints, and who updates devices in the field.

It is worth starting the discussion of the task precisely from this layer — k3s forgives a lot, but not a broken channel or manual edits on a live node. Describe the situation in free form, and the list below will help you not to miss anything.

In response, we will return an implementation plan with stages, timelines, and an explicit boundary of responsibility.

  • Sites and nodes: how many locations, how many machines at each, what roles are distributed across them.
  • Network: channels between sites, acceptable latency, behavior during a break, and whether fully offline operation is needed.
  • Images and updates: where artifacts are pulled from, how they are rolled out to remote nodes, whether rollback with one command is needed.
  • Storage: what data lives locally, what must survive a node reboot, whether there are encryption requirements.
  • Access: who administers the cluster, whether separation by site is needed, how credentials are issued and revoked.
  • Observability: what metrics and logs are needed, where they are collected, who receives notification of node failure.
  • Support: whether post-launch support is needed, scheduled distribution updates, and the incident response procedure.