feat: add docs
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
17e73aa12e
commit
2add749b40
36
README.md
Normal file
36
README.md
Normal file
@ -0,0 +1,36 @@
|
||||
# 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
|
||||
|
||||
```bash
|
||||
./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
|
||||
|
||||
```gotmpl
|
||||
{{ 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
|
Loading…
Reference in New Issue
Block a user