frontend yaml fix

frontend yaml fix
This commit is contained in:
Benjamin Loh 2023-10-30 11:57:08 +08:00
parent 9ece8e6098
commit 95dc090596
2 changed files with 6 additions and 6 deletions

View File

@ -6,7 +6,7 @@ metadata:
app: safeshare app: safeshare
tier: frontend tier: frontend
spec: spec:
replicas: 1 # Since you mentioned you didn't want replicas for frontend replicas: 1
selector: selector:
matchLabels: matchLabels:
app: safeshare app: safeshare
@ -19,7 +19,7 @@ spec:
spec: spec:
containers: containers:
- name: safeshare-frontend - name: safeshare-frontend
image: amusement3004/safeshare-frontend:latest image: amusement3004/safeshare-frontend
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 80 # Assuming your React app runs on port 80 - containerPort: 3000

View File

@ -6,10 +6,10 @@ metadata:
app: safeshare app: safeshare
tier: frontend tier: frontend
spec: spec:
type: LoadBalancer # This will expose the service externally, adapt based on your cloud provider or environment type: NodePort
ports: ports:
- port: 80 # Matching the container port - port: 3000
targetPort: 80 nodePort: 32000 # Optional: This is an example. Kubernetes will assign an available port if you don't specify this.
selector: selector:
app: safeshare app: safeshare
tier: frontend tier: frontend