First, install the balena CLI. You can find installation instructions for your platform at https://github.com/balena-io/balena-cli/blob/master/INSTALL.md
Once installed, log in to your balena account:
balena loginTested using an EC2 m6 instance with 64GB disk. Also known to work on a Raspberry Pi 5 with 8GB of RAM.
From the root of edge-endpoint, run:
./deploy_balena.sh <my-fleet> cpuTested using an HP Victus Laptop with Intel Core i5 processor and NVIDIA GeForce RTX 3050 Laptop GPU.
From the root of edge-endpoint, run:
./deploy_balena.sh <my-fleet> gpu [balena_os_version]The optional balena_os_version argument must match the balenaOS version running on the device
(defaults to 6.0.24%2Brev1). This is needed to compile NVIDIA kernel modules against the correct
kernel headers.
From the root of edge-endpoint, run:
./deploy_balena.sh <my-fleet> jetson-orinAll flavors deploy two services:
- A
serverservice running a k3s server as the cluster node - A
bastionservice that installs the edge-endpoint via Helm and provides kubectl/helm access
For GPU builds, NVIDIA kernel modules are compiled as part of the server image (multi-stage Docker build) and loaded at runtime before k3s starts. No separate GPU container is needed.
Configure the following variables via the <fleet>/Variables or <device>/Device Variables interfaces on the BalenaCloud dashboard:
GROUNDLIGHT_API_TOKEN - Required. The Groundlight API token for authorization.
RUN_EDGE_ENDPOINT - Set to "1" to deploy the edge-endpoint pods via Helm.
EDGE_CONFIG - Optional. YAML contents for edge-config.
GROUNDLIGHT_ENDPOINT - Optional. Override the upstream Groundlight API endpoint.
EDGE_ENDPOINT_VALUES - Optional. Comma-separated key=value pairs passed as helm --set flags.
The bastion automatically detects the inference flavor (cpu/gpu/jetson) from the server container and configures the Helm deployment accordingly.