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

35 lines
724 B
YAML
Raw Normal View History

apiVersion: apps/v1
kind: Deployment
metadata:
name: pi-proxy
labels:
kiamol: ch06
spec:
replicas: 2
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
emptyDir: {}