| name | platform-health |
| description | Check comprehensive platform health including ArgoCD apps, pods, services, certificates, and resources across the Kagenti platform |
Platform Health Check Skill
This skill helps you perform comprehensive platform health checks and identify issues quickly.
When to Use
- After deployments or cluster restarts
- Before making changes (baseline health)
- During incident investigation
- Regular health monitoring
- After running tests
- User requests "check platform" or "is everything working"
What This Skill Does
- Quick Health Overview: One-command platform status
- ArgoCD Apps: Health and sync status of all applications
- Pod Health: Check pods across all namespaces
- Service Accessibility: Test Gateway routes and certificates
- Resource Usage: CPU/memory consumption
- Component-Specific Checks: Detailed validation per component
Quick Health Check
Comprehensive Platform Status
./scripts/platform-status.sh
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
...
Quick Status Commands
argocd app list --port-forward --port-forward-namespace argocd --grpc-web
kubectl get pods -A
kubectl get pods -A | grep -vE "Running|Completed"
kubectl get svc -A
kubectl get gateway -A
kubectl get certificate -A
Detailed Health Checks
1. ArgoCD Application Health
argocd app list --port-forward --port-forward-namespace argocd --grpc-web \
-o json | jq -r '.[] | "\(.metadata.name): \(.status.health.status), \(.status.sync.status)"'
argocd app list --port-forward --port-forward-namespace argocd --grpc-web \
| grep -E "Degraded|OutOfSync|Unknown|Missing"
argocd app get <app-name> --port-forward --port-forward-namespace argocd --grpc-web
argocd app history <app-name> --port-forward --port-forward-namespace argocd --grpc-web
Expected States:
- Health:
Healthy (✓), Progressing (⚠️), Degraded (❌), Missing (❌)
- Sync:
Synced (✓), OutOfSync (⚠️)
Critical Apps (must be Healthy):
- gateway-api
- cert-manager
- istio-base, istiod
- tekton-pipelines
- keycloak
- kagenti-operator, kagenti-platform-operator
- kagenti-platform
- kagenti-ui
Optional Apps (can be Progressing):
- observability (large images, slow startup)
- kiali
- ollama
2. Pod Health by Namespace
kubectl get pods -A -o wide
kubectl get pods -A --sort-by='.status.containerStatuses[0].restartCount' | tail -20
kubectl get pods -A --field-selector=status.phase!=Running,status.phase!=Succeeded
kubectl top pods -A --sort-by=memory
kubectl top pods -A --sort-by=cpu
kubectl get pods -n observability
kubectl get pods -n keycloak
kubectl get pods -n kagenti-system
Check for these statuses:
- ❌ CrashLoopBackOff: Application crashes on startup
- ❌ ImagePullBackOff: Image not available
- ❌ Error: Container exited with error
- ⚠️ Pending: Waiting for resources or scheduling
- ⚠️ Init: Init containers still running
- ✓ Running: Pod healthy
- ✓ Completed: Job finished successfully
3. Service Accessibility
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
kubectl get gateway -A
kubectl describe gateway external-gateway -n default
kubectl get httproute -A
kubectl describe httproute <route-name> -n <namespace>
kubectl get endpoints -A | grep -v "<none>"
Expected Results:
- Grafana: HTTP/2 302 (redirect to /login)
- Prometheus: HTTP/2 302 (OAuth redirect)
- Keycloak: HTTP/2 200
- Kagenti UI: HTTP/2 200
4. Certificate Health
kubectl get certificate -A
kubectl describe certificate <cert-name> -n <namespace>
kubectl logs -n cert-manager deployment/cert-manager --tail=50
kubectl get certificate -A -o json | jq -r '.items[] | "\(.metadata.namespace)/\(.metadata.name): expires \(.status.notAfter)"'
Expected State: All certificates show Ready=True
5. Istio Service Mesh Health
kubectl get pods -n istio-system
kubectl get pods -A -o wide | grep "2/2"
kubectl get peerauthentication -A
kubectl get destinationrule -A
istioctl proxy-status
istioctl x describe pod <pod-name> -n <namespace>
6. Resource Usage
kubectl top nodes
kubectl top pods -A --sort-by=memory | head -20
kubectl top pods -A --sort-by=cpu | head -20
kubectl top pods -n observability
kubectl top pods -n keycloak
kubectl top pods -n kagenti-system
kubectl get nodes -o json | jq -r '.items[] | "\(.metadata.name): \(.status.conditions[] | select(.type=="MemoryPressure" or .type=="DiskPressure") | .type)=\(.status)"'
7. Storage Health
kubectl get pv
kubectl get pvc -A
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
Component-Specific Health Checks
Observability Stack
kubectl get pods -n observability -l app=prometheus
kubectl exec -n observability deployment/grafana -- \
curl -s http://prometheus.observability.svc:9090/-/ready
kubectl get pods -n observability -l app=grafana
curl -k -I https://grafana.localtest.me:9443/api/health
kubectl get pods -n observability -l app=loki
kubectl exec -n observability deployment/grafana -- \
curl -s http://loki.observability.svc:3100/ready
kubectl get pods -n observability -l app=tempo
kubectl exec -n observability deployment/grafana -- \
curl -s http://tempo-query-frontend.observability.svc:3100/ready
kubectl get pods -n observability -l app=phoenix
curl -k -I https://phoenix.localtest.me:9443/
kubectl get pods -n observability -l app=alertmanager
kubectl exec -n observability deployment/alertmanager -c alertmanager -- \
wget -qO- http://localhost:9093/-/ready
Authentication & Authorization
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
kubectl get pods -n oauth2-proxy
kubectl get deployment -n oauth2-proxy
curl -k "https://keycloak.localtest.me:9443/realms/master/.well-known/openid-configuration"
Platform Components
kubectl get pods -n kagenti-operator
kubectl logs -n kagenti-operator deployment/kagenti-operator --tail=20
kubectl get pods -n kagenti-platform-operator
kubectl logs -n kagenti-platform-operator deployment/kagenti-platform-operator --tail=20
kubectl get pods -n kagenti-platform -l app=kagenti-ui
curl -k -I https://kagenti.localtest.me:9443/
kubectl get pods -n tekton-pipelines
kubectl get pipelineruns -A
Health Check Checklists
Post-Deployment Health Check
Pre-Change Health Check
Incident Investigation Health Check
Common Health Issues
Issue: Pods stuck in Pending
kubectl describe pod <pod-name> -n <namespace>
Issue: Pods CrashLoopBackOff
kubectl logs <pod-name> -n <namespace> --previous
kubectl get events -n <namespace> --sort-by='.lastTimestamp' | tail -20
Issue: Service not accessible
kubectl get pods -n <namespace> -l app=<service>
kubectl get endpoints -n <namespace> <service-name>
kubectl get httproute -n <namespace>
kubectl run debug-curl -n <namespace> --image=curlimages/curl --rm -it \
-- curl http://<service-name>.<namespace>.svc:PORT
Issue: Certificate not Ready
kubectl describe certificate <cert-name> -n <namespace>
kubectl logs -n cert-manager deployment/cert-manager
Issue: High resource usage
kubectl top pods -A --sort-by=memory | head -10
kubectl top pods -A --sort-by=cpu | head -10
kubectl logs <pod-name> -n <namespace> | grep -i "out of memory"
kubectl describe pod <pod-name> -n <namespace> | grep -A5 "Limits:"
Automation & Monitoring
Continuous Health Monitoring
watch -n 5 'kubectl get pods -A | grep -vE "Running|Completed"'
watch -n 10 'argocd app list --port-forward --port-forward-namespace argocd --grpc-web | grep -vE "Healthy.*Synced"'
watch -n 5 'kubectl get pods -n observability'
Scheduled Health Checks
*/15 * * * * /path/to/kagenti-demo-deployment/scripts/platform-status.sh > /tmp/health-$(date +\%Y\%m\%d-\%H\%M).log 2>&1
./scripts/capture-platform-snapshot.sh hourly-check
Related Documentation
Integration with Other Skills
After health check, if issues found:
- Use investigate-incident skill for RCA
- Use check-logs skill to examine error logs
- Use check-metrics skill for performance analysis
- Use check-alerts skill to see if alerts fired
Pro Tips
- Always baseline first: Run health check BEFORE making changes
- Use platform-status.sh: Single command for comprehensive check
- Capture snapshots: Use
capture-platform-snapshot.sh for historical comparison
- Check critical apps first: Focus on gateway-api, istio, keycloak, operators
- Look for patterns: Multiple pods failing often indicates cluster-wide issue
- Check Git history: Recent commits may explain new issues
- Verify after fixes: Always re-run health check after remediation
🤖 Generated with Claude Code