Build the apps/snotes project as a container image tagged docker.io/localhost/snotes:latest,
import it directly into k0s containerd (no SSH needed — same machine), and create Flux-managed
Kubernetes manifests in clusters/thelab/snotes/ following the clusters/thelab/apps/ pattern.
Git sync is explicitly disabled via env var. imagePullPolicy is Never so k0s uses the locally
imported image.
- Files involved:
apps/snotes/Makefile— add new local-only build/import targetsapps/snotes/Dockerfile— existing, no changes neededclusters/thelab/snotes/namespace.yaml— newclusters/thelab/snotes/snotes-deployment.yaml— newclusters/thelab/snotes/kustomization.yaml— new
- Related patterns:
clusters/thelab/apps/(namespace + deployment + kustomization structure) - Dependencies: podman (build tool), k0s installed locally on same machine
- Infrastructure/manifest work — no application code changes, no test suite requirement
- Complete each task fully before moving to the next
Files:
-
No file changes (system install)
-
Check if podman is installed:
podman --version -
If missing, install:
apt-get install -y podman -
Verify:
podman version
Files:
-
Modify:
apps/snotes/Makefile -
Add
build-snotestarget:podman build --platform linux/amd64 -t docker.io/localhost/snotes:latest . -
Add
import-snotestarget:podman save docker.io/localhost/snotes:latest | k0s ctr -n k8s.io images import - -
Add
publish-snotestarget combining both: depends onbuild-snotes import-snotes
Files:
-
No file changes (runtime step)
-
Run
make publish-snotesfromapps/snotes/ -
Verify image is available in k0s containerd:
k0s ctr -n k8s.io images ls | grep snotes -
Confirm
docker.io/localhost/snotes:latesttag is present
Files:
-
Create:
clusters/thelab/snotes/namespace.yaml -
Create:
clusters/thelab/snotes/snotes-deployment.yaml -
Create:
clusters/thelab/snotes/kustomization.yaml -
Create
namespace.yamlwith namespacesnotes(matching apps/namespace.yaml pattern) -
Create
snotes-deployment.yamlwith:- Deployment in namespace
snotes - image:
docker.io/localhost/snotes:latest - imagePullPolicy:
Never - containerPort:
7000 - env:
GIT_SYNC_ENABLED=false - env:
FLATNOTES_AUTH_TYPE=none(flatnotes app env var name, value none for no auth) - resources: requests/limits (matching nginx pattern)
- ClusterIP Service on port 7000
- Deployment in namespace
-
Create
kustomization.yamlwith namespacesnotes, referencing both yaml files -
Check if
clusters/thelab/kustomization.yamlexists; if so, add snotes to its resources list -
Git add, commit, and push the new manifests to trigger Flux reconciliation
- Verify Flux reconciles without errors:
k0s kubectl get kustomization -n flux-system - Verify snotes namespace exists:
k0s kubectl get ns snotes - Verify pod is running:
k0s kubectl get pods -n snotes - Verify GIT_SYNC_ENABLED=false in running pod:
k0s kubectl exec -n snotes <pod> -- env | grep GIT_SYNC
- Move this plan to
docs/plans/completed/