kubectl-appwrite is a read-only kubectl plugin for Appwrite maintainers and
platform operators.
It is designed to answer one question quickly:
What is broken, risky, or suspicious in this Appwrite region right now?
The main command is:
kubectl appwrite triagetriage inspects a namespace and groups related signals by workload.
Current checks include:
- Deployment availability
- StatefulSet readiness
- Pod readiness and failed pods
- Evicted pods and recovered evictions
- Container waiting states such as
CrashLoopBackOffandImagePullBackOff - High container restart counts
- Recent important warning events
- KEDA
ScaledObjectreadiness and activity - HPA metric availability and below-min replica state
The binary must be named kubectl-appwrite for kubectl to discover it as
kubectl appwrite.
go install github.com/chiragagg5k/kubectl-appwrite@latestOr build locally from this repository:
go build -o kubectl-appwrite .Then make sure the binary is on your PATH.
For example:
go build -o ~/go/bin/kubectl-appwrite .Verify that kubectl can see it:
kubectl plugin listkubectl appwrite triage -n cloudThe command uses your active kube context. Switch contexts with either:
kubectx <context>or:
kubectl config use-context <context>-n, --namespace string Kubernetes namespace to inspect
-v, --verbose Show healthy components
-c, --color string Color output: auto, always, never
Color defaults to auto. In auto mode, color is disabled when output is not a
terminal or when NO_COLOR is set. Use --color=always to force color.
The default output is grouped for incident triage:
Context: do-nyc3-cloud-nyc3-prod
Namespace: cloud
Summary
Status: DEGRADED
Critical: 1
Warnings: 12
Recovered: 0
Healthy: 41
Critical Workloads
x worker-deletes
issue: deployment unavailable
available: 1/3
Warnings
! worker-stats-resources
issue: KEDA invalid, KEDA ScaledObject status unknown, HPA metrics unavailable, high restarts
pod: worker-stats-resources-7d56f7dfcb-9jvmn
restarts: 80
causes:
- KEDA ScaledObject invalid
- KEDA ScaledObject status unknown
- HPA external metrics unavailable
- container restart count elevated
Recovered Issues
none
Healthy
ok 41 workloads healthy
use --verbose to show healthy components
Install dependencies:
go mod downloadFormat Go files:
make fmtCheck formatting without modifying files:
make check-fmtRun tests and build:
make test
make buildRun the command locally:
go run . triage -n cloud