zkt24/Second-Assigment/shopfront-service.yaml

43 lines
740 B
YAML

---
apiVersion: v1
kind: Service
metadata:
name: shopfront
labels:
app: shopfront
spec:
type: NodePort
selector:
app: shopfront
ports:
- protocol: TCP
port: 8010
name: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: shopfront
spec:
selector:
matchLabels:
app: shopfront
replicas: 1
template:
metadata:
labels:
app: shopfront
spec:
containers:
- name: shopfront
image: thetips4you/shopfront:latest
ports:
- containerPort: 8010
livenessProbe:
httpGet:
path: /health
port: 8010
initialDelaySeconds: 30
timeoutSeconds: 1