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

43 lines
747 B
YAML
Raw Normal View History

apiVersion: v1
kind: ConfigMap
metadata:
name: vweb-config-v41
labels:
kiamol: ch09
data:
v.txt:
v4.1-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: v4.1
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-v41