Deployment Operations
These commands manage the active state of your application within the Kubernetes cluster.
up {environment}
The "Launch" button. Deploys your infrastructure and application to the cluster.
- Automated Workflow: Automatically runs migrations and performs a connectivity smoke test.
- Validation: Use
--dry-runto perform a full architectural validation of your manifests before deploying. - Deduplicated Manifests: LaraKube CLI uses a unique single-pass engine to ensure your Kubernetes resources are never registered twice.
build
The "Image Builder." Rebuild the local Docker image for the project and re-import it into the local k3d cluster.
- Use Cases: After a
Dockerfile.phpchange, or to refresh a stale local image without a fullup. - Automatic Sideload: Images are automatically imported into the k3d cluster via
k3d image import.
deploy?Production deployments are now under the cloud:* namespace — use larakube cloud:deploy {environment}. The flat larakube deploy was renamed in v0.3.0 to consolidate all cloud-related commands.
env {name}
The "Workspace" tool. Create a new Kubernetes environment overlay (e.g., staging, production).
- Isolation: Each environment gets its own namespace and dedicated resources.
- Blueprint Inheritance: Inherits your base architectural DNA while allowing environment-specific overrides.
smoke {environment}
The "Smoke Test" tool. Performs a connectivity smoke test to ensure the application is reachable and responding correctly.
- Automatic Execution: Usually run automatically after
up, but can be called manually for verification. - Default: Targets the
localenvironment if no argument is provided.
This was previously larakube test. The new larakube test is a phpunit/pest runner — separate, dedicated command. Scripts that called the old name should switch to larakube smoke.
about {environment}
The "Health Check" button. Display a unified architectural and health overview of the project.
- Visual Feedback: Shows 🟢 Ready for healthy services and 🔴 Not Ready for issues.
- Metrics: Quickly see container restarts and pod age to identify unstable services.
- Default: Targets the
localenvironment if no argument is provided.
stop {environment}
The "Safe Pause" button. Scales all application and database pods to 0.
- Data Safety: Your data remains perfectly safe in the cluster volumes (PVCs).
- Stability: Use this instead of
downfor daily development to avoid volume permission issues. - Quick Resume: Use
larakube startto bring your environment back to life in seconds.
start {environment}
The "Resume" button. Scales your pods back to their original replica counts.
down {environment}
The "Cleanup" button. Removes your application's resources and internal volumes from the cluster.
- Safety Preview: Use
--dry-runto see which resources will be deleted before they are removed. - Confirmation: Requires you to type the project name to confirm the deletion.
- Force Mode: Use
--forceto skip the manual confirmation.
purge {environment}
The "Nuclear Cleanup." Completely removes LaraKube CLI manifests AND all cluster resources for the project, including database PVCs.
- More destructive than
down:downremoves app/internal volumes butpurgealso wipes persistent data (databases, storage volumes). - Use when: Starting completely fresh, or when
resetof the project's blueprint is also planned. - Confirmation: Requires explicit project-name confirmation.
reset
The "Hard Reset." Remove all LaraKube CLI DNA and manifests from the project.
- Action: Deletes
.larakube.json,.infrastructure, and other LaraKube CLI-generated files. - Destructive: This is a destructive action that wipes the project's Kubernetes configuration.
- Force Mode: Use
--forceto skip confirmation.
purge
The "Total Project Cleanup." Completely remove LaraKube CLI manifests and cluster resources from this project.
- Action: Deletes cluster resources (Namespaces, PersistentVolumes) and local files (
.infrastructure,.larakube.json, Dockerfiles). - Preservation: Your actual Laravel source code and database data (in
volume_data) remain safe. - Best Practice: Use
purgefollowed byinitif you want to re-architect a project from a clean slate.
uninstall
The "System Cleanup." Remove the LaraKube CLI application from your system.
- Action: Deletes the
larakubebinary from your system path. - Recommendation: Run
trust:removefirst to clean up the SSL root CA from your system trust store.
GitHub Actions
LaraKube CLI provides built-in tools to manage your CI/CD workflows directly from the CLI.
gha:configure {environment}
The "CI Architect." Configure GitHub Actions secrets and workflows for a specific environment using the native GitHub CLI container.
gha:login
The "CI Authenticator." Authenticate with GitHub using the official CLI.
gha:switch
The "Context Switcher." Switch between different GitHub accounts.