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

33 lines
569 B
YAML

apiVersion: v1
kind: Service
metadata:
name: apod-web
namespace: kiamol-ch14-test
spec:
ports:
- port: 8014
targetPort: web
selector:
app: apod-web
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: apod-web
namespace: kiamol-ch14-test
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