一键导入
platform-health
Check comprehensive platform health including ArgoCD apps, pods, services, certificates, and resources across the Kagenti platform
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Check comprehensive platform health including ArgoCD apps, pods, services, certificates, and resources across the Kagenti platform
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Check currently firing Grafana alerts, analyze alert status, and investigate alert issues in the Kagenti platform
Query and analyze logs using Grafana Loki for the Kagenti platform, search for errors, and investigate issues
Query Prometheus metrics, check resource usage, and analyze platform performance in the Kagenti platform
Investigate platform incidents, perform RCA, create incident documentation, and follow alert runbooks in the Kagenti platform
| name | platform-health |
| description | Check comprehensive platform health including ArgoCD apps, pods, services, certificates, and resources across the Kagenti platform |
This skill helps you perform comprehensive platform health checks and identify issues quickly.
# Single command for full platform health (includes pytest tests)
./scripts/platform-status.sh
# What it checks:
# ✓ ArgoCD applications (health & sync status)
# ✓ Platform pods (all namespaces)
# ✓ Gateway & certificates
# ✓ Istio mTLS configuration
# ✓ Service accessibility (via Gateway)
# ✓ OAuth authentication
# ✓ Integration tests (pytest)
Expected Output:
=== ArgoCD Applications Status ===
✓ gateway-api: Healthy, Synced
✓ cert-manager: Healthy, Synced
✓ istio-base: Healthy, Synced
...
=== Platform Pods ===
observability grafana-xxx 2/2 Running
observability prometheus-xxx 2/2 Running
...
=== Gateway & Certificates ===
✓ external-gateway: Programmed
✓ grafana-cert: Ready
...
=== Integration Tests ===
PASSED tests/validation/test_app_state.py::test_critical_apps
...
# ArgoCD apps summary
argocd app list --port-forward --port-forward-namespace argocd --grpc-web
# All pods summary
kubectl get pods -A
# Failing pods only
kubectl get pods -A | grep -vE "Running|Completed"
# Service endpoints
kubectl get svc -A
# Gateway status
kubectl get gateway -A
# Certificate status
kubectl get certificate -A
# List all apps with health status
argocd app list --port-forward --port-forward-namespace argocd --grpc-web \
-o json | jq -r '.[] | "\(.metadata.name): \(.status.health.status), \(.status.sync.status)"'
# Check for unhealthy apps
argocd app list --port-forward --port-forward-namespace argocd --grpc-web \
| grep -E "Degraded|OutOfSync|Unknown|Missing"
# Get details for specific app
argocd app get <app-name> --port-forward --port-forward-namespace argocd --grpc-web
# Check app sync history
argocd app history <app-name> --port-forward --port-forward-namespace argocd --grpc-web
Expected States:
Healthy (✓), Progressing (⚠️), Degraded (❌), Missing (❌)Synced (✓), OutOfSync (⚠️)Critical Apps (must be Healthy):
Optional Apps (can be Progressing):
# All pods with status
kubectl get pods -A -o wide
# Pods sorted by restarts
kubectl get pods -A --sort-by='.status.containerStatuses[0].restartCount' | tail -20
# Pods with issues
kubectl get pods -A --field-selector=status.phase!=Running,status.phase!=Succeeded
# Pod resource usage
kubectl top pods -A --sort-by=memory
kubectl top pods -A --sort-by=cpu
# Specific namespace health
kubectl get pods -n observability
kubectl get pods -n keycloak
kubectl get pods -n kagenti-system
Check for these statuses:
# Test all platform services via Gateway
for service in grafana prometheus tempo phoenix kiali keycloak kagenti; do
echo "=== Testing https://$service.localtest.me:9443/ ==="
curl -k -I -m 5 "https://$service.localtest.me:9443/" 2>&1 | head -3
echo
done
# Check Gateway status
kubectl get gateway -A
kubectl describe gateway external-gateway -n default
# Check HTTPRoutes
kubectl get httproute -A
kubectl describe httproute <route-name> -n <namespace>
# Check service endpoints (should have IP addresses)
kubectl get endpoints -A | grep -v "<none>"
Expected Results:
# All certificates status
kubectl get certificate -A
# Check certificate details
kubectl describe certificate <cert-name> -n <namespace>
# Check cert-manager logs for issues
kubectl logs -n cert-manager deployment/cert-manager --tail=50
# Verify certificate expiration
kubectl get certificate -A -o json | jq -r '.items[] | "\(.metadata.namespace)/\(.metadata.name): expires \(.status.notAfter)"'
Expected State: All certificates show Ready=True
# Check Istio components
kubectl get pods -n istio-system
# Verify sidecar injection (should show 2/2 containers)
kubectl get pods -A -o wide | grep "2/2"
# Check mTLS policies
kubectl get peerauthentication -A
kubectl get destinationrule -A
# Istio proxy status
istioctl proxy-status
# Check specific pod mesh config
istioctl x describe pod <pod-name> -n <namespace>
# Node resources
kubectl top nodes
# Cluster-wide pod resources
kubectl top pods -A --sort-by=memory | head -20
kubectl top pods -A --sort-by=cpu | head -20
# Namespace resource usage
kubectl top pods -n observability
kubectl top pods -n keycloak
kubectl top pods -n kagenti-system
# Check for resource pressure
kubectl get nodes -o json | jq -r '.items[] | "\(.metadata.name): \(.status.conditions[] | select(.type=="MemoryPressure" or .type=="DiskPressure") | .type)=\(.status)"'
# PersistentVolumes
kubectl get pv
# PersistentVolumeClaims
kubectl get pvc -A
# Check PVC usage via metrics
kubectl exec -n observability deployment/grafana -- \
curl -s -G 'http://prometheus.observability.svc:9090/api/v1/query' \
--data-urlencode 'query=(kubelet_volume_stats_used_bytes / kubelet_volume_stats_capacity_bytes) * 100' \
| python3 -m json.tool
# Prometheus
kubectl get pods -n observability -l app=prometheus
kubectl exec -n observability deployment/grafana -- \
curl -s http://prometheus.observability.svc:9090/-/ready
# Grafana
kubectl get pods -n observability -l app=grafana
curl -k -I https://grafana.localtest.me:9443/api/health
# Loki
kubectl get pods -n observability -l app=loki
kubectl exec -n observability deployment/grafana -- \
curl -s http://loki.observability.svc:3100/ready
# Tempo
kubectl get pods -n observability -l app=tempo
kubectl exec -n observability deployment/grafana -- \
curl -s http://tempo-query-frontend.observability.svc:3100/ready
# Phoenix
kubectl get pods -n observability -l app=phoenix
curl -k -I https://phoenix.localtest.me:9443/
# AlertManager
kubectl get pods -n observability -l app=alertmanager
kubectl exec -n observability deployment/alertmanager -c alertmanager -- \
wget -qO- http://localhost:9093/-/ready
# Keycloak
kubectl get pods -n keycloak -l app=keycloak
kubectl exec -n keycloak statefulset/keycloak -- \
curl -s http://localhost:8080/health/ready | python3 -m json.tool
# OAuth2-Proxy instances
kubectl get pods -n oauth2-proxy
kubectl get deployment -n oauth2-proxy
# Test Keycloak SSO
curl -k "https://keycloak.localtest.me:9443/realms/master/.well-known/openid-configuration"
# Kagenti Operator
kubectl get pods -n kagenti-operator
kubectl logs -n kagenti-operator deployment/kagenti-operator --tail=20
# Kagenti Platform Operator
kubectl get pods -n kagenti-platform-operator
kubectl logs -n kagenti-platform-operator deployment/kagenti-platform-operator --tail=20
# Kagenti UI
kubectl get pods -n kagenti-platform -l app=kagenti-ui
curl -k -I https://kagenti.localtest.me:9443/
# Tekton Pipelines
kubectl get pods -n tekton-pipelines
kubectl get pipelineruns -A
./scripts/capture-platform-snapshot.sh before-change# Check pod description for reason
kubectl describe pod <pod-name> -n <namespace>
# Common causes:
# - Insufficient CPU/memory
# - No nodes matching nodeSelector
# - Unbound PersistentVolumeClaim
# Check previous logs
kubectl logs <pod-name> -n <namespace> --previous
# Check events
kubectl get events -n <namespace> --sort-by='.lastTimestamp' | tail -20
# Common causes:
# - Application error on startup
# - Missing configuration
# - Dependency not available
# Check pod status
kubectl get pods -n <namespace> -l app=<service>
# Check service endpoints
kubectl get endpoints -n <namespace> <service-name>
# Check HTTPRoute
kubectl get httproute -n <namespace>
# Test from inside cluster
kubectl run debug-curl -n <namespace> --image=curlimages/curl --rm -it \
-- curl http://<service-name>.<namespace>.svc:PORT
# Check certificate status
kubectl describe certificate <cert-name> -n <namespace>
# Check cert-manager logs
kubectl logs -n cert-manager deployment/cert-manager
# Common causes:
# - DNS validation failing
# - Rate limit reached
# - Invalid configuration
# Find top consumers
kubectl top pods -A --sort-by=memory | head -10
kubectl top pods -A --sort-by=cpu | head -10
# Check for memory leaks
kubectl logs <pod-name> -n <namespace> | grep -i "out of memory"
# Check resource limits
kubectl describe pod <pod-name> -n <namespace> | grep -A5 "Limits:"
# Watch pod status
watch -n 5 'kubectl get pods -A | grep -vE "Running|Completed"'
# Watch ArgoCD apps
watch -n 10 'argocd app list --port-forward --port-forward-namespace argocd --grpc-web | grep -vE "Healthy.*Synced"'
# Monitor specific namespace
watch -n 5 'kubectl get pods -n observability'
# Cron job for periodic health checks (local dev)
# Add to crontab: crontab -e
*/15 * * * * /path/to/kagenti-demo-deployment/scripts/platform-status.sh > /tmp/health-$(date +\%Y\%m\%d-\%H\%M).log 2>&1
# Compare snapshots over time
./scripts/capture-platform-snapshot.sh hourly-check
After health check, if issues found:
capture-platform-snapshot.sh for historical comparison🤖 Generated with Claude Code