修改日志挂载路径

This commit is contained in:
付庆吉
2021-08-02 09:24:29 +08:00
parent 091ea9dd82
commit 2f9fc4116b
3 changed files with 12 additions and 6 deletions

View File

@ -35,10 +35,18 @@ spec:
# 定义容器模板,该模板可以包含多个容器 # 定义容器模板,该模板可以包含多个容器
spec: spec:
volumes:
- name: log
hostPath:
path: /var/lib/docker/log/349553515466-test/default-group/all #开发环境
# 必选Pod中容器列表 # 必选Pod中容器列表
containers: containers:
- name: biz-service-ebtp-extend - name: biz-service-ebtp-extend
image: harbor.dcos.guangzhou.unicom.local/eshop/biz-service-ebtp-extend:latest image: harbor.dcos.guangzhou.unicom.local/eshop/biz-service-ebtp-extend:latest
# 在容器中挂载日志存储区
volumeMounts:
- name: log
mountPath: /log
# 需要暴露的端口库号列表 # 需要暴露的端口库号列表
ports: ports:
- containerPort: 18018 - containerPort: 18018

View File

@ -37,9 +37,8 @@ spec:
spec: spec:
volumes: volumes:
- name: log - name: log
persistentVolumeClaim: hostPath:
claimName: log-pvc path: /var/lib/docker/log/349553515466-preprod/default-group/all #开发环境
readOnly: false
affinity: affinity:
podAntiAffinity: podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:

View File

@ -38,9 +38,8 @@ spec:
# 挂载日志存储 # 挂载日志存储
volumes: volumes:
- name: log - name: log
persistentVolumeClaim: hostPath:
claimName: log-pvc path: /var/lib/docker/log/349553515466-uat/default-group/all #开发环境
readOnly: false
# 必选Pod中容器列表 # 必选Pod中容器列表
containers: containers: