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

36 lines
581 B
YAML
Raw Normal View History

apiVersion: v1
kind: Service
metadata:
name: apod-web
labels:
kiamol: ch16
spec:
ports:
- port: 8016
targetPort: web
nodePort: 30000
selector:
app: apod-web
type: NodePort
---
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