kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch06/pi/proxy/update/nginx-hostPath.yaml

37 lines
796 B
YAML
Raw Permalink Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
name: pi-proxy
labels:
kiamol: ch06
spec:
replicas: 3
selector:
matchLabels:
app: pi-proxy
template:
metadata:
labels:
app: pi-proxy
spec:
containers:
- image: nginx:1.17-alpine
name: nginx
ports:
- containerPort: 80
name: http
volumeMounts:
- name: config
mountPath: "/etc/nginx/"
readOnly: true
- name: cache-volume
mountPath: /data/nginx/cache
volumes:
- name: config
configMap:
name: pi-proxy-configmap
- name: cache-volume
hostPath:
path: /volumes/nginx-cache
type: DirectoryOrCreate