kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch09/vweb/update/vweb-v3-with-configMap.yaml

43 lines
735 B
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: vweb-config
labels:
kiamol: ch09
data:
v.txt:
v3-from-config
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: vweb
labels:
kiamol: ch09
spec:
replicas: 3
selector:
matchLabels:
app: vweb
template:
metadata:
labels:
app: vweb
version: v3
spec:
containers:
- name: web
image: kiamol/ch09-vweb:v2
ports:
- name: http
containerPort: 80
volumeMounts:
- name: static
mountPath: "/usr/share/nginx/html/"
readOnly: true
volumes:
- name: static
configMap:
name: vweb-config