Astro on Kubernetes
Content-first sites with islands of interactivity.
larakube astro:newAstro builds content-first sites into plain files. LaraKube CLI runs Astro's dev server with hot reload on your machine, and serves the built site from a tiny Caddy image in production.
The Astro scaffolder has not been run end to end yet. Try it, but don't promise it to a client until this badge turns green.
🚀 Create a project
larakube astro:new site
LaraKube CLI runs the official create-astro inside a node:24-alpine container and hands you its wizard — minimal, blog, portfolio, docs and more.
| Flag | What it does |
|---|---|
--template=blog | Pass a create-astro template through and skip its wizard |
--fast | Skip the wizard and take the minimal template |
Already have a Astro project?
Run this from its root instead:
larakube init
LaraKube CLI recognises Astro from its Astro config and pre-selects it; pass --framework= to skip the picker. It adds the same Dockerfile.static, Caddyfile and Kubernetes manifests that a new project gets. Add --dry-run to see the list first without writing anything.
🧱 What LaraKube CLI adds
| File | What it does |
|---|---|
Dockerfile.static and Caddyfile | Builds the site inside Docker and serves dist/ from Caddy |
.infrastructure/ | Kubernetes manifests: a dev-server pod locally, the Caddy image in the cloud |
Variables the browser needs must start with PUBLIC_.
🔌 A backend, if you want one
A static site has no database of its own, so there's nothing to share in the Plex Commons. To pull data from PocketBase or Directus on the same cluster:
larakube data:wire
💻 Run it locally
cd site
larakube up
Astro's dev server runs inside the cluster on port 5173, with hot reload.
☁️ Deploy
larakube env production
larakube cloud:deploy production