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

37 lines
563 B
YAML
Raw Permalink Normal View History

apiVersion: v1
kind: Service
metadata:
name: apod-api
labels:
kiamol: ch16
spec:
ports:
- port: 80
targetPort: api
selector:
app: apod-api
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: apod-api
labels:
kiamol: ch16
spec:
selector:
matchLabels:
app: apod-api
template:
metadata:
labels:
app: apod-api
spec:
containers:
- name: api
image: kiamol/ch14-image-of-the-day
ports:
- containerPort: 80
name: api