Skip to content

Building Smart Farms with Edge Computing Systems Using Kubernetes

Sergio Méndez

CloudThe Linux Foundation35 minOpen on YouTube ↗

Presents building Smart Farms with Edge Computing Systems Using Kubernetes and evaluates key implications for security practitioners.

Summary

# Building Smart Farms with Edge Computing Systems Using Kubernetes

## Overview Sergio Manes, a systems engineer from Guatemala and organizer for Kubernetes Guatemala, presents a practical guide to deploying edge computing systems for agricultural IoT applications using K3s (lightweight Kubernetes). The talk emphasizes how edge computing and cloud computing complement each other rather than compete, with a working demonstration of a smart farm monitoring system.

## Architecture and Concepts

The presentation establishes a four-layer IoT architecture: device layer (sensors and microcontrollers), edge/far-edge layer (local processing), telecommunications layer (network connectivity), and cloud layer (managed services). Edge computing performs computations at or near the data source rather than sending all data to centralized cloud infrastructure, reducing bandwidth and enabling faster response times.

The speaker distinguishes between traditional IoT (limited microcontroller logic, cloud-dependent) and modern edge computing (processing local to data source using more capable hardware). ARM-based architectures are highlighted as preferable to Intel for edge deployments due to superior energy efficiency and cost-benefit ratios.

## K3s and Hardware Platforms

K3s is presented as a lightweight Kubernetes distribution designed for resource-constrained environments. It is distributed as a single ~100MB binary containing all necessary cluster components, making it deployable on devices like Raspberry Pi and other ARM-based systems. The speaker notes K3s is a Cloud Native Computing Foundation project gaining momentum for rapid prototyping and production deployments.

Various edge devices are discussed: Raspberry Pi (for prototyping), RockPi 64, Nvidia Jetson, and production-grade alternatives. The distinction between prototype and production hardware is emphasized, with production devices required to withstand harsh environmental conditions (extreme temperatures, humidity, rough handling).

## Smart Farm Implementation

A live demonstration showcases a complete monitoring system: - LoRa transmitter and receiver devices for long-distance wireless communication (915 MHz frequency band, supports multiple regional bands) - DHT11 sensor capturing temperature and humidity - Raspberry Pi cluster running K3s with Metrix service for data processing - MySQL database for data persistence - Grafana dashboard for real-time visualization

LoRa protocol uses very low power for long-range transmission. The Metrix service runs on the edge cluster, receives sensor data via HTTP requests, performs calculations (temperature conversions), and stores results in MySQL. The system processes data locally before selectively transmitting processed information to cloud instances.

The live demo illustrated real-time temperature and humidity monitoring using an ice pack to trigger environmental changes, demonstrating system responsiveness within seconds. The speaker shows the data pipeline: LoRa devices transmit sensor readings → receiver captures and sends to local cluster → Metrix service processes JSON data → MySQL stores → Grafana displays.

## Technical Implementation Details

Code examples demonstrate JSON payload generation on transmitting devices, HTTP service calls from receivers to the Metrix service, and database insertion functions storing device number, temperature, humidity, and timestamps. Complementary tools mentioned include Metal (load balancer), NetMaker (network management), and Docker containers for application deployment.

Practical applications discussed include computer vision, security cameras with machine learning, vehicular traffic monitoring, temperature monitoring in cities, manufacturing, health sector, and agriculture. The smart farm approach aims to automate agricultural processes using big data, tracking, monitoring, and analysis to optimize resource use and plant maintenance.

## Takeaways

1. K3s enables practical Kubernetes deployments on affordable, low-power edge hardware 2. Edge processing reduces cloud dependency, bandwidth costs, and latency for time-sensitive applications 3. LoRa provides viable long-distance communication for geographically dispersed monitoring 4. ARM architecture offers superior efficiency for edge deployments compared to Intel-based systems 5. Local data processing enables automated actions like irrigation system triggers based on sensor thresholds 6. Edge and cloud computing architectures work best as complementary technologies rather than competing approaches

Related talks