资源清单单词大小写
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
# 创建 Deployment
|
# ----------------------------
|
||||||
|
# Deployment
|
||||||
|
# ----------------------------
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
@@ -12,7 +14,6 @@ spec:
|
|||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
labels:
|
|
||||||
app: test-lessie-agents
|
app: test-lessie-agents
|
||||||
environment: test
|
environment: test
|
||||||
project: lessie
|
project: lessie
|
||||||
@@ -43,14 +44,14 @@ spec:
|
|||||||
type: DirectoryOrCreate
|
type: DirectoryOrCreate
|
||||||
containers:
|
containers:
|
||||||
- name: test-lessie-agents # 容器名称
|
- name: test-lessie-agents # 容器名称
|
||||||
image: uswccr.ccs.tencentyun.com/lessietest/lessie-sourcing-agents:v21_dxin_f2c4c4b0_202510271638 # 容器镜像
|
image: uswccr.ccs.tencentyun.com/lessietest/lessie-sourcing-agents:v24_dxin_9042beec_202510271811 # 容器镜像
|
||||||
imagepullPolicy: IfNotPresent # 镜像拉取策略 ,有则不拉
|
imagePullPolicy: IfNotPresent # 镜像拉取策略 ,有则不拉
|
||||||
env:
|
env:
|
||||||
- name: POD_NAME
|
- name: POD_NAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.name
|
fieldPath: metadata.name
|
||||||
- name: APP_ENV_VALUE
|
- name: APP_ENV
|
||||||
value: "s1"
|
value: "s1"
|
||||||
- name: APP_PORT
|
- name: APP_PORT
|
||||||
value: "8000"
|
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://<Node_IP>:38000
|
# 集群外部(其他节点):http://<Node_IP>:38000
|
||||||
|
# ----------------------------
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
@@ -102,6 +106,6 @@ spec:
|
|||||||
- name: http
|
- name: http
|
||||||
port: 8000 # ClusterIP 内部端口
|
port: 8000 # ClusterIP 内部端口
|
||||||
targetPort: 8000 # 容器端口
|
targetPort: 8000 # 容器端口
|
||||||
nodePort: 38000 # 节点对外端口
|
nodePort: 30800 # 节点对外端口(30000-32767)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user