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

37 lines
616 B
YAML
Raw Normal View History

2019-10-30 18:09:06 -04:00
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