apiVersion: apps/v1
kind: Deployment
metadata:
name: app-server
namespace: dev
spec:
replicas: 1 # tells deployment to run 2 pods matching the template
selector:
matchLabels:
app: app-server
template: # create pods using pod definition in this template
metadata:
labels:
app: app-server
spec:
containers:
- name: app
image: registry.cn-hangzhou.aliyuncs.com/xxx/app-server:0.0.1
env:
- name: TASK_JTK_ORDER_ENABLED
value: 'true'
- name: TASK_HW_ORDER_ENABLED
value: 'true'
ports:
- containerPort: 28088
volumeMounts:
- name: wxpay
mountPath: /usr/wxpay/
volumes:
- name: wxpay
hostPath:
path: /root/project/xxx/app/app-server/wxpay/
- 如果想要挂载,配置好,哪怕没有创建目录(或文件夹),配置生效后会自动创建