Skip to content

K8s HTTP Health Check Policy

Andy Potanin edited this page Jun 21, 2026 · 1 revision

Creates a GKE HealthCheckPolicy for a backend service used with the Gateway API.

Use this module when a Rabbit service exposed through the shared HTTP gateway needs a custom health check configuration instead of the default GKE health check.

Supported Features

  • GKE HealthCheckPolicy creation (networking.gke.io/v1).
  • HTTP health check with configurable port and path.
  • Target reference to a Kubernetes Service.

Prerequisites

  • A kubeconfig secret created by the k8s-access module.
  • The target service must exist in the specified namespace.
  • The GKE cluster must have the Gateway API enabled.

Important Notes

  • The health check name is derived from name with a -hc suffix.
  • targetRef.kind should be Service.
  • The health check is used by the GKE Gateway controller to determine backend health.
  • Default health check endpoint is /status on port 12030, matching the worker-site container health endpoint.

Minimal Example

services:
  - name: "k8s Health Check Policy"
    module: "k8s-http-health-check-policy"
    id: "health-check"
    deployment_order: 92
    configurations:
      name: "www-example-com"
      namespace: "www-example-com"
      targetRef:
        kind: "Service"
      port: 12030
      requestPath: "/status"

Outputs

This module does not produce outputs.

Full Configuration Schema

The fields below are public module inputs under configurations.

configurations:
  name: "www-example-com"
  namespace: "www-example-com"
  targetRef:
    kind: "Service"
  port: 12030
  requestPath: "/status"
  secret_labels:
    creator: "automation"
    r2a_module: "k8s-http-health-check-policy"
Field Type Required Description
name string Yes Base name for the health check policy and the target service.
namespace string Yes Namespace of the target service.
targetRef object Yes Reference to the target resource.
targetRef.kind string Yes Kind of the target resource. Typically Service.
port number No Health check port. Defaults to 12030.
requestPath string No Health check HTTP path. Defaults to /status.
secret_labels map[string] No Labels for associated secrets.

Clone this wiki locally