Environment Overview
Comprehensive environment health check for stage, production, or ephemeral.
Inputs
| Input |
Type |
Default |
Purpose |
namespace |
string |
required |
Kubernetes namespace |
environment |
string |
stage |
stage, production, ephemeral |
Workflow
1. Load Persona
2. K8s Queries
k8s_environment_summary(environment="{{ environment }}")
k8s_namespace_health(namespace="{{ namespace }}", environment="{{ environment }}")
kubectl_get_services(namespace="{{ namespace }}", environment="{{ environment }}")
kubectl_get_ingress(namespace="{{ namespace }}", environment="{{ environment }}")
kubectl_get_pods(namespace="{{ namespace }}", environment="{{ environment }}")
kubectl_top_pods(namespace="{{ namespace }}", environment="{{ environment }}") — resource usage
kubectl_get_events(namespace="{{ namespace }}", environment="{{ environment }}") — warning events
3. Prometheus (optional)
prometheus_check_health(namespace="{{ namespace }}", environment="{{ environment }}")
4. Parse & Analyze
- Pod counts: Running, Pending, Failed
- High CPU/memory pods
- Warning events (error, failed, backoff, unhealthy)
5. Error Recovery
- "unauthorized" →
kube_login(cluster="stage" or "prod")
- "no route to host" →
vpn_connect()
6. Memory
memory_session_log("Checked environment overview", "namespace={{ namespace }}, healthy={{ healthy }}")
Output
Report: namespace health, services table, ingress hosts, pod counts (Running/Pending/Failed), resource usage, warning events, and quick commands for logs/deployments.
1---2name: environment-overview3description: Environment health check showing namespace health, services, ingress, pods, resource usage, and warning events. Use when user says "how's stage?", "environment overview", "status of namespace X", or "check prod".4---56# Environment Overview78Comprehensive environment health check for stage, production, or ephemeral.910## Inputs1112| Input | Type | Default | Purpose |13|-------|------|---------|---------|14| `namespace` | string | required | Kubernetes namespace |15| `environment` | string | stage | stage, production, ephemeral |1617## Workflow1819### 1. Load Persona20- `persona_load("devops")`2122### 2. K8s Queries23- `k8s_environment_summary(environment="{{ environment }}")`24- `k8s_namespace_health(namespace="{{ namespace }}", environment="{{ environment }}")`25- `kubectl_get_services(namespace="{{ namespace }}", environment="{{ environment }}")`26- `kubectl_get_ingress(namespace="{{ namespace }}", environment="{{ environment }}")`27- `kubectl_get_pods(namespace="{{ namespace }}", environment="{{ environment }}")`28- `kubectl_top_pods(namespace="{{ namespace }}", environment="{{ environment }}")` — resource usage29- `kubectl_get_events(namespace="{{ namespace }}", environment="{{ environment }}")` — warning events3031### 3. Prometheus (optional)32- `prometheus_check_health(namespace="{{ namespace }}", environment="{{ environment }}")`3334### 4. Parse & Analyze35- Pod counts: Running, Pending, Failed36- High CPU/memory pods37- Warning events (error, failed, backoff, unhealthy)3839### 5. Error Recovery40- "unauthorized" → `kube_login(cluster="stage" or "prod")`41- "no route to host" → `vpn_connect()`4243### 6. Memory44- `memory_session_log("Checked environment overview", "namespace={{ namespace }}, healthy={{ healthy }}")`4546## Output4748Report: namespace health, services table, ingress hosts, pod counts (Running/Pending/Failed), resource usage, warning events, and quick commands for logs/deployments.