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

36 lines
781 B
YAML
Raw Normal View History

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: pi-proxy
labels:
kiamol: ch06
spec:
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