From 77026482f3a1770756b009b271e804fa4115b741 Mon Sep 17 00:00:00 2001 From: dxin Date: Mon, 27 Oct 2025 20:29:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=B8=85=E5=8D=95=E5=8D=95?= =?UTF-8?q?=E8=AF=8D=E5=A4=A7=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/test_lessie_sourcing_agents.yaml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/k8s_yaml/test/test_lessie_sourcing_agents.yaml b/k8s_yaml/test/test_lessie_sourcing_agents.yaml index 54c0af7..6de3ae4 100644 --- a/k8s_yaml/test/test_lessie_sourcing_agents.yaml +++ b/k8s_yaml/test/test_lessie_sourcing_agents.yaml @@ -1,4 +1,6 @@ -# 创建 Deployment +# ---------------------------- +# Deployment +# ---------------------------- apiVersion: apps/v1 kind: Deployment metadata: @@ -12,7 +14,6 @@ spec: replicas: 1 selector: matchLabels: - labels: app: test-lessie-agents environment: test project: lessie @@ -43,14 +44,14 @@ spec: type: DirectoryOrCreate containers: - name: test-lessie-agents # 容器名称 - image: uswccr.ccs.tencentyun.com/lessietest/lessie-sourcing-agents:v21_dxin_f2c4c4b0_202510271638 # 容器镜像 - imagepullPolicy: IfNotPresent # 镜像拉取策略 ,有则不拉 + image: uswccr.ccs.tencentyun.com/lessietest/lessie-sourcing-agents:v24_dxin_9042beec_202510271811 # 容器镜像 + imagePullPolicy: IfNotPresent # 镜像拉取策略 ,有则不拉 env: - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - - name: APP_ENV_VALUE + - name: APP_ENV value: "s1" - name: APP_PORT value: "8000" @@ -80,9 +81,12 @@ spec: --- -# 创建 Service -# 集群内部(其他 Pod):http://test-lessie-agents-svc.test-lessie:8000 +# ---------------------------- +# Service +# 集群内部(其他 Pod):http://test-lessie-agents-svc.test-lessie:8000(错误的) # 集群外部(其他节点):http://:38000 +# ---------------------------- + apiVersion: v1 kind: Service metadata: @@ -102,6 +106,6 @@ spec: - name: http port: 8000 # ClusterIP 内部端口 targetPort: 8000 # 容器端口 - nodePort: 38000 # 节点对外端口 + nodePort: 30800 # 节点对外端口(30000-32767)