Kubernetes Deployment Healthcheck SLI

Icon 1 6 Troubleshooting Commands

Icon 2 Contributed by stewartshea

Icon 2 Codecollection: rw-cli-codecollection


This SLI uses kubectl to score deployment health. Produces a value between 0 (completely failing the test) and 1 (fully passing the test). Looks for container restarts, critical log errors, pods not ready, deployment status, and recent events.

Tasks:
  • Get Container Restarts and Score for Deployment `${DEPLOYMENT_NAME}`
  • Get Critical Log Errors and Score for Deployment `${DEPLOYMENT_NAME}`
  • Get NotReady Pods Score for Deployment `${DEPLOYMENT_NAME}`
  • Get Deployment Replica Status and Score for `${DEPLOYMENT_NAME}`
  • Get Recent Warning Events Score for `${DEPLOYMENT_NAME}`
  • Generate Deployment Health Score for `${DEPLOYMENT_NAME}`