mountpath openresty
apiVersion: apps/v1
kind: Deployment # 定义是Deployment
metadata:
name: openresty
spec:
selector :
matchLabels:
app: openresty
replicas: 1
template:
metadata:
labels:
app: openresty
spec:
nodeName:
kubernetes-node-01
containers:
- name: openresty
image: bitnami/openresty:latest
#command: ["/bin/bash", "-ce", "tail -f /dev/null"]
command: ["/opt/bitnami/scripts/openresty/run.sh"]
ports:
- containerPort: 80
volumeMounts:
- name: web-config
mountPath: /opt/bitnami/openresty/nginx/conf/server_blocks/
volumes:
- name: web-config
hostPath:
path: /root/config/
type: directory