knut-flight-server — Kubernetes deploy (N5, Runtime=Kube)
The knut Arrow Flight server as a k8s service. These manifests are rendered by Skidbladnir from the single ComponentSpec::knut_flight (the SAME spec that drives the systemd install) through the ONE Kubernetes renderer (src/k8s.rs) — they are a checked-in snapshot, not a hand-maintained source:
cargo run --example render-knut-flight-k8s -- dist/k8s/knut
# → dist/k8s/knut/knut/knut-flight-{deployment,service}.yaml
namespace.yaml is the one hand-written piece (the renderer projects a workload + Service, not cluster provisioning).
Build the image
# in the knut repo — build the version-stamped release binary, then image it:
cargo build --release -p knut-flight --bin knut-flight-server
mkdir -p /tmp/knut-flight-ctx
cp target/release/knut-flight-server /tmp/knut-flight-ctx/
podman build -t knut-flight-server:0.1.3 \
-f containers/knut-flight/Containerfile /tmp/knut-flight-ctx
Load the image into the cluster (no registry / airgap)
The image tag is version-pinned (:0.1.3, not :latest) so the default imagePullPolicy: IfNotPresent uses a locally-loaded image.
# k3s / containerd:
podman tag knut-flight-server:0.1.3 docker.io/library/knut-flight-server:0.1.3
podman save docker.io/library/knut-flight-server:0.1.3 -o /tmp/knut-flight.tar
sudo k3s ctr images import /tmp/knut-flight.tar
# kind: kind load image-archive /tmp/knut-flight.tar
Apply
kubectl apply -f namespace.yaml
kubectl apply -f knut-flight-deployment.yaml -f knut-flight-service.yaml
kubectl -n knut rollout status deployment/knut-flight
Prove it
kubectl -n knut port-forward svc/knut-flight 50055:50055 &
python3 -c "import pyarrow.flight as fl; print(len(list(fl.connect('grpc://127.0.0.1:50055').list_flights())), 'flights')"
Validate offline (no cluster)
kubeconform -strict -summary -kubernetes-version 1.31.0 *.yaml