/healthGET200 OK, 로딩 중이면 503 Service Unavailable 반환.apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: full-option-runner
namespace: default
위와 같은 YAML은 다음과 같은 주소를 예측할 수 있습니다.
full-option-runner.default.haifu.cloud
클러스터 내부 기준
http://full-option-runner.default.svc.cluster.local/health 주소로 health 체크 진행하시면 됩니다.
클러스터 외부 기준
http://full-option-runner.default.haifu.cloud/health
요청 주소 (내부 DNS): http://knative-kube-prometheus-st-prometheus.observability.svc.cluster.local:9090
EndPoint: /api/v1/query
요청 방식: GET
파라미터: query=[PromQL문장]
위 기준으로 사용자 함수를 배포했을 경우
예시: api/v1/query?query=kn_revision_pods_count{kn_service_name="inline-test-runner",k8s_namespace_name=”default”}
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: inline-test-runner
namespace: default
Return
{
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "kn_revision_pods_count",
"container": "autoscaler",
"endpoint": "http-metrics",
"instance": "10.42.3.22:9090",
"job": "autoscaler",
"k8s_namespace_name": "default",
"kn_configuration_name": "inline-test-runner",
"kn_revision_name": "inline-test-runner-00001",
"kn_service_name": "inline-test-runner",
"namespace": "knative-serving",
"otel_scope_name": "knative.dev/serving/pkg/autoscaler",
"pod": "autoscaler-7dd5d54cf-4qwf5",
"service": "autoscaler"
},
"value": [1764815755.454, "1"
]
}
]
}
}
value에 있는 앞 숫자는 Unix Timestamp