Skip to content
streamprobe

Guide

On a Raspberry Pi

A real cluster for streamprobe, on a Pi 4 that already runs other things in Docker: k3s, Argo CD, the operator, and the streams to watch, all kept in step with this repository.

1. What GitOps changes

With kubectl apply or helm install you push changes into the cluster. With GitOps the cluster pulls them: Argo CD runs inside it, watches a Git repository, and keeps the cluster equal to what the repository says. A merged commit is rolled out; a change made by hand in the cluster is put back. The repository becomes the record of what runs and why.

Here two Argo CD Applications point at this repository:

In Nomad terms: instead of running nomad job run from a laptop or a pipeline, an agent in the cluster reads the job files from Git and runs them itself.

2. Before you start

sudo sed -i '$ s/$/ cgroup_memory=1 cgroup_enable=memory/' /boot/firmware/cmdline.txt
sudo reboot

3. k3s, without Traefik

k3s is a complete Kubernetes in one binary, made for small machines. It ships Traefik and a load balancer that take ports 80 and 443; a Pi that already serves things from Docker needs those ports, and streamprobe needs no ingress, so both are left out. k3s runs its own containerd, separate from Docker: the two do not see each other's containers.

curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--disable traefik --disable servicelb --write-kubeconfig-mode 644" sh -
mkdir -p ~/.kube && cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
kubectl get nodes

The node is Ready after a minute. k3s installs kubectl too.

4. Argo CD core

The core install of Argo CD is the controllers without the web UI and the API server, so it needs noticeably less memory than the full install. You drive it with kubectl, which is all this setup needs.

kubectl create namespace argocd
kubectl apply -n argocd --server-side -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/core-install.yaml
kubectl -n argocd rollout status deploy/argocd-repo-server --timeout=5m

5. The operator and the streams

Two applies, and from here on Argo CD does the rest:

kubectl apply -f https://raw.githubusercontent.com/Allan-Nava/streamprobe-operator/main/deploy/argocd/streamprobe-operator.yaml
kubectl apply -f https://raw.githubusercontent.com/Allan-Nava/streamprobe-operator/main/deploy/argocd/streamprobes.yaml

The streams' Application retries until the operator's CRD exists, so the order they settle in does not matter.

6. Check it

kubectl get applications -n argocd
kubectl get pods -n streamprobe-system
kubectl get streamprobes -n streams -w

Within a minute or two:

NAME             READY   REASON        EDGE        ADVANCED   AGE
akamai-test      False   FetchFailed                          2m
unified-live     True    Live          935133081   41s        2m
unified-scte35   True    Live          935133090   38s        2m

The two Unified Streaming demos are live. Akamai's test channel is in the list on purpose: on 2026-11-23 its only variant answered 404, so it shows what a failing stream looks like. kubectl describe sp akamai-test -n streams has the error and the event.

7. Read the metrics

The metrics endpoint is HTTPS and asks for a token allowed to read it, as the chart sets it up. For a quick look from the Pi:

kubectl create clusterrolebinding streamprobe-metrics-reader \
  --clusterrole=streamprobe-operator-metrics-reader \
  --serviceaccount=streamprobe-system:streamprobe-operator-controller-manager
TOKEN=$(kubectl create token streamprobe-operator-controller-manager -n streamprobe-system)
kubectl -n streamprobe-system port-forward svc/streamprobe-operator-controller-manager-metrics-service 8443 &
curl -sk -H "Authorization: Bearer $TOKEN" https://localhost:8443/metrics | grep ^streamprobe_

A Prometheus in the cluster reads the same endpoint through the chart's ServiceMonitor, with three alerts: set prometheus.enabled: true in the operator's Application (see the reference).

8. Watch your own stream

Add a file to deploy/probes/ and list it in deploy/probes/kustomization.yaml:

apiVersion: streaming.allan-nava.github.io/v1alpha1
kind: StreamProbe
metadata:
  name: my-channel
spec:
  url: https://origin.example.com/live/my-channel/index.m3u8
  interval: 30s

Commit and push: Argo CD polls the repository every three minutes and creates it. Delete the file, and the probe goes too. On a fork, change repoURL in the two Applications to your repository first.

9. Remove it

kubectl delete -f https://raw.githubusercontent.com/Allan-Nava/streamprobe-operator/main/deploy/argocd/streamprobes.yaml
kubectl delete -f https://raw.githubusercontent.com/Allan-Nava/streamprobe-operator/main/deploy/argocd/streamprobe-operator.yaml
/usr/local/bin/k3s-uninstall.sh      # all of Kubernetes; Docker is not touched