서비스에 상태 프로브 추가
기본적으로 수신 컨트롤러는 노출된 Pod에 대한 HTTP GET 프로브를 프로비저닝합니다.
deployment
/pod
사양에 준비 또는 활동성 프로브를 추가하여 프로브 속성을 사용자 지정할 수 있습니다.
readinessProbe
또는 livenessProbe
사용
apiVersion: networking.k8s.io/v1
kind: Deployment
metadata:
name: aspnetapp
spec:
replicas: 3
template:
metadata:
labels:
service: site
spec:
containers:
- name: aspnetapp
image: mcr.microsoft.com/dotnet/samples:aspnetapp
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
readinessProbe:
httpGet:
path: /
port: 80
periodSeconds: 3
timeoutSeconds: 1
Kubernetes API 참조:
참고 항목
readinessProbe
및livenessProbe
는httpGet
로 구성된 경우 지원됩니다.- 현재 Pod에 노출된 포트 이외의 포트에 대한 프로빙은 지원되지 않습니다.
HttpHeaders
,InitialDelaySeconds
,SuccessThreshold
는 지원되지 않습니다.
readinessProbe
또는 livenessProbe
없음
위의 프로브가 제공되지 않으면 수신 컨트롤러는 서비스가 backend-path-prefix
주석에 지정된 Path
또는 서비스에 대한 ingress
정의에 지정된 path
에 대해 연결할 수 있다고 가정합니다.
상태 프로브에 대한 기본값
준비/활동성 프로브에서 유추할 수 없는 모든 속성의 경우 기본값이 설정됩니다.
Application Gateway 프로브 속성 | 기본값 |
---|---|
Path |
/ |
Host |
localhost |
Protocol |
HTTP |
Timeout |
30 |
Interval |
30 |
UnhealthyThreshold |
3 |