Run the MCP server close to the agents and devices that use it, with the data living on your own cluster.
Build once.
Remember everywhere.
Aperio’s K3s path turns a commit into an ARM64 container, publishes it to GitHub Container Registry, and gives a small home cluster a signed signal to roll out the new image.
What are you trying to prove?
K3s is useful when Aperio should stay running on a small, private machine instead of on a developer laptop.
Build the same Docker image that the Pi will pull. Cross-build on GitHub’s runners and catch packaging errors before rollout.
Push to the deployment branch, publish immutable and latest tags, then let the cluster pull and restart the workload.
A small chain with clear ownership.
Each part has one job. When a deployment fails, start at the last completed hand-off instead of guessing at the whole system.
skip ci.ghcr.io/<owner>/aperio with both latest and commit-specific tags.latest is convenient for the cluster, while the SHA tag preserves the exact image that was built. When an update misbehaves, you have a precise release to identify and roll back.What the deployment workflow does.
The workflow is deliberately boring: checkout, cross-build, publish, notify. The cluster remains the place where the application runs.
A normal push follows the branch that changed. A manual dispatch can choose a branch, or skip the build when the image already exists.
QEMU and Buildx let an AMD64 GitHub runner produce a linux/arm64 image. The target architecture is explicit, not an accident of the builder.
The workflow authenticates to GHCR with the Actions token and pushes the public image under the repository owner’s lowercase namespace.
Two secrets. One narrow door.
The Pi does not need a GitHub account, and GitHub does not need cluster credentials. The webhook is the small bridge between them.
| Secret | Lives in | Purpose |
|---|---|---|
APERIO_PI_WEBHOOK_URL | GitHub Actions secrets | The private HTTPS endpoint that receives a deployment notification. |
APERIO_PI_WEBHOOK_SECRET | GitHub + Pi service | Shared HMAC material so the Pi can verify that the notification is genuine. |
| GHCR token | GitHub Actions | The built-in GITHUB_TOKEN grants package write access for the image push. |
From green check to running pod.
A normal release should need no SSH session. Manual dispatch is there for recovery, experimentation, or deploying a branch on purpose.
Find the broken hand-off.
Check GHCR permissions, the repository owner casing, and the Buildx/QEMU step. A failed build cannot notify a healthy cluster.
Check the URL, HMAC secret, HTTPS reachability, and the Pi-side service logs. A successful GitHub job only proves the notification left GitHub.
Inspect the image architecture, registry pull status, environment configuration, and persistent storage. Keep the previous SHA available until the new pod is healthy.