Larakube is a terminal UI for inspecting Laravel workloads running in Kubernetes.
It is built for the common production debugging loop:
- Pick a Laravel namespace.
- Select one or more pods.
- Run Laravel-specific inspection commands.
- Read logs or command output without leaving the terminal.
Larakube intentionally stays small and shells out to kubectl instead of using the Kubernetes Go SDK.
Laravel applications in Kubernetes often need the same checks over and over:
- Which pods are healthy?
- What environment is this app running in?
- Are there failed queue jobs?
- What do the latest logs look like?
- Is Horizon running?
- What routes or scheduled tasks are registered?
Larakube puts those checks behind a single TUI and lets you run them across multiple pods in the same namespace.
- Config-driven namespace picker
- Multi-select pod workflow
- Laravel-oriented action menu
- Aggregated output across selected pods
- Configurable logging source:
- Kubernetes stdout with
kubectl logs - log file tailing inside the container
- Kubernetes stdout with
- Horizontal and vertical scrolling for long output
- Optional feature-gated actions such as Horizon
- Custom Artisan commands
- Custom shell commands
- Interactive config bootstrap with
go run . init
- Failed queue jobs
- Laravel version
- App environment
- Route list
- Schedule list
- Config overview
- Migration status
- Queue status
- Optimize clear with confirmation
- Horizon status when enabled
- Application log tailing
- Custom Artisan command
- Custom shell command
- Go 1.22+
kubectlinstalled and available inPATH- A working kubeconfig / current context
- Access to the target namespaces and pods
- PHP / Laravel available inside the target application containers
go run .go build -o larakube .
./larakubePrebuilt binaries are published on the GitHub Releases page for tagged versions:
https://github.com/parsingeye/larakube/releases
go run . initThis writes a starter larakube.config.json in the project directory.
{
"laravelNamespaces": [
"production-web",
"production-worker"
],
"features": {
"horizon": false
},
"logs": {
"source": "stdout",
"path": "storage/logs/laravel.log",
"tail": 100,
"container": ""
}
}./larakubeLarakube reads larakube.config.json from the project root.
The namespace picker only shows namespaces listed here.
Example:
{
"laravelNamespaces": ["production-web", "production-worker"]
}Feature flags control optional actions.
Supported flags:
horizon: show Horizon-related actions
Example:
{
"features": {
"horizon": true
}
}Controls how the log action works.
Supported fields:
source:"stdout"or"file"path: file path whensourceis"file"tail: number of lines to readcontainer: optional container name when usingstdout
Examples:
Kubernetes stdout logging:
{
"logs": {
"source": "stdout",
"tail": 200,
"container": "app"
}
}Container file logging:
{
"logs": {
"source": "file",
"path": "storage/logs/laravel.log",
"tail": 200
}
}If omitted, Larakube uses these defaults:
logs.source:stdoutlogs.path:storage/logs/laravel.loglogs.tail:100
j/k: movepgup/pgdn: pageenter: select namespacer: reload namespacesq: quit
j/k: movepgup/pgdn: pagespace: select podenter: open actionsl: toggle Laravel-only filteringr: refresh podsesc: back to namespaces
j/k: movepgup/pgdn: pageenter: run actionesc: back
j/k: vertical scrollh/l: horizontal scrollpgup/pgdn: page verticallyr: rerun current actionesc: back
- Pod discovery uses
kubectl get pods -n <namespace> -o json - Commands run with
kubectl exec -n <namespace> <pod> -- ... - Stdout log mode uses
kubectl logs -n <namespace> <pod> ... kubectlcalls use a timeout to avoid hanging forever- Output is normalized before rendering
- Multi-pod results are prefixed with
=== namespace/pod ===
- Namespace selection is intentionally config-driven.
- The current version targets the default pod container unless
logs.containeris set for stdout logs. - Pods in configured namespaces are treated as Laravel pods even when their names are generic.
- Some Laravel commands may still be expensive in large production datasets.
queue:failedis run with unlimited PHP memory to avoid common memory exhaustion failures in large failed-job tables.
Run locally:
go run .Create a config:
go run . initBuild:
go build .Format:
gofmt -w *.goGitHub releases are built automatically with GitHub Actions when you push a version tag.
Example:
git tag v0.1.0
git push origin v0.1.0That workflow builds archives for:
- macOS amd64
- macOS arm64
- Linux amd64
- Linux arm64
Each release archive includes:
larakubeREADME.mdLICENSE
The repository is set up with:
- GitHub vulnerability alerts
- GitHub secret scanning and push protection
- Dependabot updates for:
- Go modules
- GitHub Actions
- CodeQL analysis for Go on:
- pushes to
master - pull requests to
master - a weekly schedule
- pushes to
- Gitleaks secret scanning on:
- pushes to
master - pull requests to
master - a weekly schedule
- pushes to
- Container selection for multi-container pods
- Live log streaming
- Per-namespace overrides
- Additional Laravel diagnostics
- Exportable output
MIT