java-tutorials/spring-cloud-modules/spring-cloud-kubernetes/kubernetes-minikube/object-configurations/frontend-deployment.yaml

35 lines
643 B
YAML

kind: Service
apiVersion: v1
metadata:
name: minikube-demo-frontend
spec:
selector:
app: minikube-demo-frontend
ports:
- protocol: TCP
port: 8081
nodePort: 30001
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: minikube-demo-frontend
spec:
selector:
matchLabels:
app: minikube-demo-frontend
replicas: 3
template:
metadata:
labels:
app: minikube-demo-frontend
spec:
containers:
- name: minikube-demo-frontend
image: minikube-demo-frontend:latest
imagePullPolicy: Never
ports:
- containerPort: 8081