Liveness Probe
curl --request GET \
--url {scheme}://{host}:{port}/healthzimport requests
url = "{scheme}://{host}:{port}/healthz"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('{scheme}://{host}:{port}/healthz', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "{scheme}://{host}:{port}/healthz",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{scheme}://{host}:{port}/healthz"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{scheme}://{host}:{port}/healthz")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/healthz")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "ok",
"timestamp": "2026-03-19T15:00:00Z"
}
Health
Endpoints de Saúde
Endpoints de liveness e readiness do servidor da API REST do operator (porta 8090, sem autenticação)
GET
/
healthz
Liveness Probe
curl --request GET \
--url {scheme}://{host}:{port}/healthzimport requests
url = "{scheme}://{host}:{port}/healthz"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('{scheme}://{host}:{port}/healthz', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "{scheme}://{host}:{port}/healthz",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{scheme}://{host}:{port}/healthz"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{scheme}://{host}:{port}/healthz")
.asString();require 'uri'
require 'net/http'
url = URI("{scheme}://{host}:{port}/healthz")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "ok",
"timestamp": "2026-03-19T15:00:00Z"
}
Os dois endpoints ficam na raiz do servidor da API REST —
Sempre retorna
Lista Issues pela API do Kubernetes (limite 1, timeout de 5 segundos). Retorna
http://<operator-host>:8090/healthz e /readyz, não em /api/v1 — e não exigem API key. Eles informam o estado do próprio servidor da API REST.
Estes não são os endpoints que o Kubernetes consulta. As probes de liveness e readiness do Deployment do operator usam os endpoints do controller-runtime
/healthz e /readyz na porta de health 8081 (value health.port do chart), que só verificam se o processo do manager está vivo. Use os endpoints da 8090 abaixo para monitorar a API de fora.Verificação de Liveness
GET /healthz
200 OK enquanto o servidor da API REST estiver atendendo. Nenhuma autenticação necessária.
{
"status": "ok",
"timestamp": "2026-03-19T15:00:00Z"
}
Verificação de Readiness
GET /readyz
200 OK quando isso funciona e 503 Service Unavailable, com o texto do erro em status, quando falha (API server inacessível, RBAC faltando, CRD não instalado).
{
"status": "ready",
"timestamp": "2026-03-19T15:00:00Z"
}
{
"status": "not ready: context deadline exceeded",
"timestamp": "2026-03-19T15:00:00Z"
}