kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch16/apod/web.yaml

35 lines
563 B
YAML
Raw Permalink Normal View History

apiVersion: v1
kind: Service
metadata:
name: apod-web
labels:
kiamol: ch16
spec:
ports:
- port: 8016
targetPort: web
selector:
app: apod-web
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: apod-web
labels:
kiamol: ch16
spec:
selector:
matchLabels:
app: apod-web
template:
metadata:
labels:
app: apod-web
spec:
containers:
- name: web
image: kiamol/ch14-image-gallery
ports:
- containerPort: 80
name: web