k8s-usage

Configure Kubernetes health probes with liveness and readiness endpoints in Salvo routers.

1|Updated Mar 16, 2024
One-click install
npx skills add https://github.com/tdcare/genies --skill k8s-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-usage
Source: https://github.com/tdcare/genies/tree/main/.qoder/skills/k8s-usage
Command: npx skills add https://github.com/tdcare/genies --skill k8s-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kubernetes health probes are essential to keep Genies services reliable in Kubernetes by exposing endpoints that reflect process health.

Core Features & Use Cases

  • Exposes /actuator/health/liveness and /actuator/health/readiness endpoints for Kubernetes checks.
  • Integrates with Salvo routers to serve health endpoints and supports graceful shutdown.
  • Uses a global SERVICE_STATUS flag to reflect readiness and liveness state across the process.

Quick Start

Add k8s_health_check to your Salvo router and toggle SERVICE_STATUS to ready to expose health endpoints.

Frequently Asked Questions about k8s-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Kubernetes liveness and readiness probes for a Salvo router?

To configure Kubernetes liveness and readiness probes for a Salvo router, you add the k8s_health_check endpoint to the router and toggle the global SERVICE_STATUS flag to ready, returning 200 OK or 503 service unavailable based on probe results.

What is the purpose of health probes in Kubernetes deployments?

Health probes in Kubernetes deployments expose endpoints that reflect process health, ensuring services remain reliable by allowing Kubernetes to check liveness and readiness states before routing traffic or restarting containers.

How do I handle graceful shutdowns with Kubernetes health checks?

To handle graceful shutdowns with Kubernetes health checks, you toggle the global SERVICE_STATUS flag to reflect an unready state, which makes the readiness endpoint return 503 service unavailable and stops Kubernetes from sending new traffic.

Can I use this to wire liveness and readiness endpoints into Genies services?

Yes, you can wire liveness and readiness endpoints into Genies services by applying this configuration in Kubernetes deployments, using a global SERVICE_STATUS map to report health and return 200 OK or 503 service unavailable.

Does the health probe integration require external dependencies?

No, the health probe integration requires no external dependencies, using a global SERVICE_STATUS map within the process to serve the /actuator/health/liveness and /actuator/health/readiness endpoints directly via Salvo routers.