|
||
---|---|---|
app | ||
k8s | ||
generate-k8s.sh | ||
README.md | ||
spin.values.yaml |
Fermyon kubernetes test (k3s)
This is just a simple sample app for getting up and running on kubernetes with fermyon spin.
The commands are quite handheld, and builds on: https://developer.fermyon.com/spin/v2/kubernetes#install-plugin
So follow that guide first and patch the following as you get to it.
Usage
Infrastructure
To generate the k8s
deployment, which contains the basic requirements for getting spin running on kubernetes
./generate-k8s.sh
Now either kubectl apply -f ./k8s
or add to a gitops repo (that is what I did)
This is also where the first patch have to be done for k3s. K3s, cannot be patched at runtime on its containerd/config.toml
as such manually add this section to a new file at /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl
{{ template "base" .}}
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.spin]
runtime_type = "io.containerd.spin.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."spin".options]
BinaryName = "/usr/local/bin/containerd-shim-spin-v2"
Now restart k3s sudo systemctl restart k3s
and the change should take effect
App
The app is quite simple simply kubectl apply on the app/spin-test-app/deploy.yaml
and you should be good to go. You may have to patch the ingress to suit your needs, it is setup for my own right now. As this is mostly just a test for me, I won't create a generalized setup