-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdeployment.yaml
More file actions
34 lines (32 loc) · 800 Bytes
/
deployment.yaml
File metadata and controls
34 lines (32 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
apiVersion: apps/v1
kind: Deployment
metadata:
name: react-app-deployment
spec:
replicas: 3 # Adjust the number of replicas as needed
selector:
matchLabels:
app: react-app
template:
metadata:
labels:
app: react-app
spec:
containers:
- name: react-app-container
image: dab8106/2048:latest # Use your actual Docker image name and tag
ports:
- containerPort: 3000 # The port your React app is listening on
---
apiVersion: v1
kind: Service
metadata:
name: react-app-service
spec:
selector:
app: react-app
ports:
- protocol: TCP
port: 80 # The port exposed by the service within the cluster
targetPort: 3000 # The port your React app is listening on inside the pod
type: LoadBalancer