update
This commit is contained in:
130
agent-common/SplitProject/监管平台-Doris-k8s/doris-deployment.yaml
Normal file
130
agent-common/SplitProject/监管平台-Doris-k8s/doris-deployment.yaml
Normal file
@@ -0,0 +1,130 @@
|
||||
# doris-fe-app.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: doris-fe-app
|
||||
namespace: zyly
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harborsecret
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: doris-fe-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: doris-fe-app
|
||||
spec:
|
||||
containers:
|
||||
- name: doris-fe-app
|
||||
image: harbor.cdcyy.com.cn/cmii/doris.fe-amd64:2.1.6
|
||||
env:
|
||||
- name: FE_SERVERS
|
||||
value: "doris-fe-service:9010" # 使用Service名称进行服务发现
|
||||
- name: FE_ID
|
||||
value: "1"
|
||||
ports:
|
||||
- containerPort: 8030
|
||||
- containerPort: 9030
|
||||
- containerPort: 9010 # 添加内部通信端口
|
||||
volumeMounts:
|
||||
- name: fe-meta
|
||||
mountPath: /opt/apache-doris/fe/doris-meta
|
||||
- name: fe-log
|
||||
mountPath: /opt/apache-doris/fe/log
|
||||
volumes:
|
||||
- name: fe-meta
|
||||
persistentVolumeClaim:
|
||||
claimName: doris-fe-meta-pvc
|
||||
- name: fe-log
|
||||
persistentVolumeClaim:
|
||||
claimName: doris-fe-log-pvc
|
||||
|
||||
---
|
||||
# doris-fe-service.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: doris-fe-service
|
||||
namespace: zyly
|
||||
spec:
|
||||
selector:
|
||||
app: doris-fe-app
|
||||
ports:
|
||||
- name: http
|
||||
port: 8030
|
||||
targetPort: 8030
|
||||
- name: query
|
||||
port: 9030
|
||||
targetPort: 9030
|
||||
- name: edit
|
||||
port: 9010 # 暴露FE内部通信端口
|
||||
targetPort: 9010
|
||||
|
||||
---
|
||||
# doris-be-app.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: doris-be-app
|
||||
namespace: zyly
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harborsecret
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: doris-be-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: doris-be-app
|
||||
spec:
|
||||
initContainers:
|
||||
- name: wait-for-fe
|
||||
image: busybox:1.28
|
||||
command: ['sh', '-c', 'until nc -z doris-fe-service 9010; do echo waiting for fe; sleep 2; done;']
|
||||
containers:
|
||||
- name: doris-be-app
|
||||
image: harbor.cdcyy.com.cn/cmii/doris.be-amd64:2.1.6
|
||||
env:
|
||||
- name: FE_SERVERS
|
||||
value: "doris-fe-service:9010"
|
||||
- name: BE_ADDR
|
||||
value: "doris-be-service:9050" # 使用Service名称
|
||||
ports:
|
||||
- containerPort: 8040
|
||||
- containerPort: 9050 # 添加BE通信端口
|
||||
volumeMounts:
|
||||
- name: doris-be-storage
|
||||
mountPath: /opt/apache-doris/be/storage
|
||||
- name: doris-be-log
|
||||
mountPath: /opt/apache-doris/be/log
|
||||
volumes:
|
||||
- name: doris-be-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: doris-be-storage-pvc
|
||||
- name: doris-be-log
|
||||
persistentVolumeClaim:
|
||||
claimName: doris-be-log-pvc
|
||||
|
||||
---
|
||||
# doris-be-service.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: doris-be-service
|
||||
namespace: zyly
|
||||
spec:
|
||||
selector:
|
||||
app: doris-be-app
|
||||
ports:
|
||||
- name: http
|
||||
port: 8040
|
||||
targetPort: 8040
|
||||
- name: be-port
|
||||
port: 9050 # 暴露BE通信端口
|
||||
targetPort: 9050
|
||||
|
||||
|
||||
Reference in New Issue
Block a user