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

38 lines
599 B
YAML
Raw Normal View History

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