标签:logs contain yam docker aml data mount spec rpo
docker run -p 80:80 --name mynginx -v $PWD/www:/www -v $PWD/conf/nginx.conf:/etc/nginx/nginx.conf -v $PWD/logs:/wwwlogs -d nginxcat nginx-pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
labels:
name: nginx-pod
spec:
containers:
- name: nginx
image: nginx
volumeMounts:
- mountPath: /www
name: www
- mountPath: /etc/nginx/nginx.conf
name: conf
- mountPath: /wwwlogs
name: logs
ports:
- containerPort: 80
volumes:
- name: www
hostPath:
path: "/root/nginx/www"
- name: conf
hostPath:
path: "/root/nginx/conf/nginx.conf"
- name: logs
hostPath:
path: "/root/nginx/logs"
标签:logs contain yam docker aml data mount spec rpo
原文地址:http://blog.51cto.com/204222/2161752