39 lines
655 B
YAML
39 lines
655 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: todo-backend
|
|
labels:
|
|
app: todo-backend
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: todo-backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: todo-backend
|
|
spec:
|
|
containers:
|
|
- name: todo-backend
|
|
image: IMAGE_PATH_PLACEHOLDER
|
|
ports:
|
|
- containerPort: 3001
|
|
env:
|
|
- name: PORT
|
|
value: "3001"
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: todo-backend-service
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app: todo-backend
|
|
ports:
|
|
- protocol: TCP
|
|
port: 3001
|
|
targetPort: 3001
|
|
nodePort: 30001
|