java-tutorials/spring-cloud/spring-cloud-kubernetes/object-configurations/backend-deployment.yaml

37 lines
616 B
YAML

kind: Service
apiVersion: v1
metadata:
name: demo-backend
spec:
selector:
app: demo-backend
tier: backend
ports:
- protocol: TCP
port: 8080
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-backend
spec:
selector:
matchLabels:
app: demo-backend
tier: backend
replicas: 3
template:
metadata:
labels:
app: demo-backend
tier: backend
spec:
containers:
- name: demo-backend
image: demo-backend:latest
imagePullPolicy: Never
ports:
- containerPort: 8080