Health Probes logo

Health Probes

Organization
RedHatProductSecurity
health-probes

Configure Kubernetes health probes, lifecycle hooks, and termination policies. Use when writing, reviewing, or auditing pod specs, Deployments, StatefulSets, or Helm templates that define liveness, readiness, startup probes, postStart/preStop hooks, or terminationMessagePolicy.

Overview

PublisherRedHatProductSecurity
Repositoryprodsec-skills
Skill namehealth-probes
Stars
56
Forks
9
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by RedHatProductSecurity on GitHub. Read the source before you install it.

Installation

Install the Health Probes AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/RedHatProductSecurity/prodsec-skills/tree/main/module/skills/health-probes
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/RedHatProductSecurity/prodsec-skills.git /tmp/prodsec-skills
mkdir -p .claude/skills
cp -r /tmp/prodsec-skills/module/skills/health-probes .claude/skills/health-probes
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Health Probes in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Health Probes on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Health Probes is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Health Probes and Lifecycle Management

Kubernetes uses health probes to determine when to restart a container, when to route traffic to a pod, and when a slow-starting application is ready. Lifecycle hooks provide initialization and graceful shutdown control. Together they enable self-healing workloads that recover from pod, host, and network failures.

Probe Types

Every container should define all three probe types:

ProbePurposeFailure Action
LivenessDetects deadlocks and hangs after the application is runningRestarts the container
ReadinessDetermines when a container can accept trafficRemoves the pod from Service endpoints
StartupProtects slow-starting containers from premature liveness killsDisables liveness/readiness checks until the app starts

Required for: Telco (mandatory), Far-Edge (mandatory), Extended (mandatory), Non-Telco (optional)

Without startup probes, slow-starting applications require large initialDelaySeconds on liveness probes, which delays failure detection after the application is running.

Probe Mechanisms

Choose the mechanism that best fits the application:

httpGet (Preferred for HTTP Services)

yaml
livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 10
  timeoutSeconds: 3
  failureThreshold: 3

Returns success for any HTTP status 200-399.

tcpSocket

yaml
readinessProbe:
  tcpSocket:
    port: 5432
  initialDelaySeconds: 5
  periodSeconds: 10

Use for non-HTTP services (databases, message brokers) where opening a TCP connection confirms the service is listening.

grpc

yaml
livenessProbe:
  grpc:
    port: 50051
    service: health
  periodSeconds: 10

Requires Kubernetes 1.27+ and the application must implement the gRPC Health Checking Protocol.

exec

Warning: Exec probes have strict performance constraints. See Exec Probe Performance Constraints before using this mechanism.

yaml
livenessProbe:
  exec:
    command:
      - /bin/sh
      - -c
      - pg_isready -U postgres
  periodSeconds: 15
  timeoutSeconds: 5

Runs a command inside the container. Success is exit code 0. Prefer httpGet or tcpSocket when possible — exec probes fork a process, which adds latency and CPU overhead.

Configuration Best Practices

ParameterGuidance
initialDelaySecondsUse startup probes instead of large values here; keep low (0-10s) when a startup probe is present
periodSecondsMust be >= 10 for exec probes; 10-30s is typical for all probe types
timeoutSecondsShould be shorter than periodSeconds; 1-5s is typical
failureThreshold3 is the default; increase for applications with occasional slow responses
successThresholdMust be 1 for liveness and startup probes; can be higher for readiness

Example: Well-Configured Container

yaml
containers:
  - name: app
    image: registry.example.com/app:v1.2.3
    ports:
      - containerPort: 8080
    startupProbe:
      httpGet:
        path: /healthz
        port: 8080
      periodSeconds: 5
      failureThreshold: 30     # allows up to 150s for startup
    livenessProbe:
      httpGet:
        path: /healthz
        port: 8080
      periodSeconds: 10
      timeoutSeconds: 3
      failureThreshold: 3
    readinessProbe:
      httpGet:
        path: /ready
        port: 8080
      periodSeconds: 5
      timeoutSeconds: 3
      failureThreshold: 3
    terminationMessagePolicy: FallbackToLogsOnError

Lifecycle Hooks

Lifecycle hooks run code at container startup and shutdown without requiring changes to the application itself.

Required for: Telco (mandatory), Far-Edge (mandatory), Extended (mandatory), Non-Telco (optional)

PostStart

Runs immediately after the container is created. Kubernetes does not change the container state to Running until the PostStart handler completes successfully.

yaml
lifecycle:
  postStart:
    exec:
      command:
        - /bin/sh
        - -c
        - /app/init.sh

Use PostStart to:

  • Verify required APIs or dependencies are available
  • Register the instance with a service registry
  • Run database migrations or schema checks

PreStop

Runs immediately before the container receives SIGTERM. The container is not terminated until the PreStop handler completes (up to terminationGracePeriodSeconds).

yaml
lifecycle:
  preStop:
    exec:
      command:
        - /bin/sh
        - -c
        - sleep 5 && /app/drain.sh

Use PreStop to:

  • Drain active connections and in-flight requests
  • Deregister from service registries or load balancers
  • Flush buffers, close database connections, release locks
  • Allow time for endpoint propagation (the sleep pattern above gives kube-proxy time to update iptables rules before the application stops accepting connections)

Exec Probe Performance Constraints

Exec probes fork a process inside the container on every probe interval. For latency-sensitive and performance-critical workloads, this overhead can cause unacceptable jitter.

CPU-Pinned Workloads

Workloads with CPU pinning (Guaranteed QoS with exclusive CPUs) must not use exec probes. Use httpGet or tcpSocket instead.

Required for: Telco (mandatory), Far-Edge (mandatory), Extended (mandatory), Non-Telco (optional)

Why: Exec probes spawn a process that competes for the pinned CPUs, interrupting latency-sensitive operations and degrading deterministic scheduling guarantees.

Real-Time Applications

Containers running real-time applications must not use exec probes.

Required for: Far-Edge (mandatory), all others (optional)

Why: Process forking causes latency spikes that violate real-time scheduling constraints.

Cluster-Wide Exec Probe Limits

Limit exec probes to fewer than 10 across the entire workload in a cluster. Each exec probe must have periodSeconds >= 10.

Required for: all profiles (optional, recommended best practice)

Why: Excessive exec probes consume system resources and can degrade overall cluster performance in resource-constrained environments.

Termination Message Policy

Set terminationMessagePolicy: FallbackToLogsOnError on all containers. This ensures that when a container exits with an error, Kubernetes captures the last chunk of the container's log output as the termination message, making failure diagnosis possible without external log aggregation.

Required for: Telco (mandatory), Far-Edge (mandatory), Extended (mandatory), Non-Telco (optional)

yaml
containers:
  - name: app
    image: registry.example.com/app:v1.2.3
    terminationMessagePolicy: FallbackToLogsOnError

The default policy (File) only reads from /dev/termination-log, which most applications do not write to, resulting in empty termination messages on failure.

Implementation Checklist

  • All containers define a liveness probe
  • All containers define a readiness probe
  • All containers define a startup probe
  • periodSeconds is >= 10 for all exec probes
  • CPU-pinned workloads (Guaranteed QoS with exclusive CPUs) do not use exec probes
  • Real-time applications do not use exec probes
  • Fewer than 10 exec probes are configured cluster-wide for the workload
  • PostStart hooks are configured for initialization logic
  • PreStop hooks are configured for graceful shutdown
  • terminationMessagePolicy: FallbackToLogsOnError is set on all containers
  • Probe timeouts and thresholds are tuned for the application's startup and response characteristics

Certsuite Test Mapping

GuidanceCertsuite Test IDProfiles
Liveness probe requiredlifecycle-liveness-probeTelco: mandatory, Far-Edge: mandatory, Extended: mandatory, Non-Telco: optional
Readiness probe requiredlifecycle-readiness-probeTelco: mandatory, Far-Edge: mandatory, Extended: mandatory, Non-Telco: optional
Startup probe requiredlifecycle-startup-probeTelco: mandatory, Far-Edge: mandatory, Extended: mandatory, Non-Telco: optional
PostStart hook configuredlifecycle-container-poststartTelco: mandatory, Far-Edge: mandatory, Extended: mandatory, Non-Telco: optional
PreStop hook configuredlifecycle-container-prestopTelco: mandatory, Far-Edge: mandatory, Extended: mandatory, Non-Telco: optional
No exec probes on CPU-pinned workloadsperformance-cpu-pinning-no-exec-probesTelco: mandatory, Far-Edge: mandatory, Extended: mandatory, Non-Telco: optional
Exec probe count and period limitsperformance-max-resources-exec-probesAll profiles: optional
No exec probes on real-time appsperformance-rt-apps-no-exec-probesFar-Edge: mandatory, all others: optional
Termination message policyobservability-termination-policyTelco: mandatory, Far-Edge: mandatory, Extended: mandatory, Non-Telco: optional

References

Frequently asked questions

What does the Health Probes AI skill do?

Configure Kubernetes health probes, lifecycle hooks, and termination policies. Use when writing, reviewing, or auditing pod specs, Deployments, StatefulSets, or Helm templates that define liveness, readiness, startup probes, postStart/preStop hooks, or terminationMessagePolicy.

Why use Health Probes on TypingMind?

Because you install it once and use it with any model. Health Probes is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Health Probes in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/RedHatProductSecurity/prodsec-skills/tree/main/module/skills/health-probes. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Health Probes?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Health Probes?

As many as you like. As long as a model supports skills, you can use Health Probes with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Health Probes AI skill free?

Yes. It is published on GitHub by RedHatProductSecurity under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇