From 3e7f0c028f05a229d59b6ef33205ef751f2d0945 Mon Sep 17 00:00:00 2001 From: zyc <1439655764@qq.com> Date: Tue, 7 Apr 2026 16:25:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=8E=E7=AB=AF=E5=81=A5=E5=BA=B7?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E6=94=B9=E7=94=A8TCP=E6=8E=A2=E9=92=88?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8DCrashLoopBackOff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 后端没有/api/health/路由,HTTP探针返回404导致Pod被反复重启, 改用tcpSocket探针检测8000端口即可。 Co-Authored-By: Claude Opus 4.6 (1M context) --- k8s/backend-deployment-prod.yaml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/k8s/backend-deployment-prod.yaml b/k8s/backend-deployment-prod.yaml index 4d9f80f..60b4d4b 100644 --- a/k8s/backend-deployment-prod.yaml +++ b/k8s/backend-deployment-prod.yaml @@ -41,24 +41,16 @@ spec: - name: CORS_ORIGINS value: "https://airlabs-manage-web.airlabs.art" livenessProbe: - httpGet: - path: /api/health/ + tcpSocket: port: 8000 - httpHeaders: - - name: Host - value: localhost initialDelaySeconds: 30 periodSeconds: 10 - timeoutSeconds: 5 + timeoutSeconds: 3 failureThreshold: 3 readinessProbe: - httpGet: - path: /api/health/ + tcpSocket: port: 8000 - httpHeaders: - - name: Host - value: localhost - initialDelaySeconds: 15 + initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 3