kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch15/vweb/v2.yaml

36 lines
534 B
YAML

apiVersion: v1
kind: Service
metadata:
name: vweb-v2
labels:
kiamol: ch15
spec:
ports:
- port: 80
targetPort: http
selector:
app: vweb-v2
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: vweb-v2
labels:
kiamol: ch15
spec:
selector:
matchLabels:
app: vweb-v2
template:
metadata:
labels:
app: vweb-v2
spec:
containers:
- name: web
image: kiamol/ch09-vweb:v2
ports:
- name: http
containerPort: 80