You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
document k8s local development with Skaffold in DEVELOPMENT.md
Add section covering both plain k8s and Knative dev workflows,
hot reload behavior, port map, and commands reference.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: DEVELOPMENT.md
+66Lines changed: 66 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,6 +179,72 @@ Local Node processes (functions):
179
179
180
180
Infrastructure runs in Docker. Functions run as local Node processes from `generated/` — no Docker rebuild needed when function code changes. Edit `functions/*/handler.ts`, rebuild (`pnpm build`), restart `make dev-fn`.
181
181
182
+
## K8s Local Development (Skaffold)
183
+
184
+
Run the entire stack in Kubernetes with hot-reload for handler code changes. Two modes are available:
185
+
186
+
### Prerequisites
187
+
188
+
- Docker Desktop with Kubernetes enabled (`kubectl get nodes` should work)
Handler code changes are hot-reloaded without rebuilding the Docker image:
222
+
223
+
1. Edit `functions/<name>/handler.ts`
224
+
2. Skaffold detects the change and syncs the file into the running container
225
+
3.`tsx --watch` picks up the change and restarts the process (~2-5 seconds)
226
+
227
+
Changes to runtime packages (`packages/fn-runtime`, `packages/fn-app`) or `package.json` trigger a full image rebuild (Skaffold handles this automatically).
228
+
229
+
### Port Map (Skaffold)
230
+
231
+
| Service | Local Port |
232
+
|---------|------------|
233
+
| simple-email | 8081 |
234
+
| send-email-link | 8082 |
235
+
| Job Service | 8080 |
236
+
| PostgreSQL | 5432 |
237
+
| Constructive Server | 3002 (Knative profile only) |
238
+
239
+
### Skaffold Commands Reference
240
+
241
+
| Command | Description |
242
+
|---------|-------------|
243
+
|`make skaffold-dev`| Start plain k8s dev loop |
244
+
|`make skaffold-dev-knative`| Start Knative dev loop |
245
+
|`skaffold build -p local-simple`| Build image only (no deploy) |
0 commit comments