Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #4

Merged
merged 4 commits into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions kuber/backend-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: node-backend
spec:
selector:
matchLabels:
app: node-backend
replicas: 3
template:
metadata:
labels:
app: node-backend
spec:
containers:
- image: danielnaumau/node-backend:test
name: node-backend
ports:
- containerPort: 8080
11 changes: 11 additions & 0 deletions kuber/backend-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: node-backend
spec:
selector:
app: node-backend
ports:
- name: http
port: 8080
targetPort: 8080
22 changes: 22 additions & 0 deletions kuber/frontend-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-frontend
spec:
selector:
matchLabels:
app: test-frontend
replicas: 2
template:
metadata:
labels:
app: test-frontend
spec:
containers:
- name: test-frontend
image: danielnaumau/test-frontend:latest
ports:
- containerPort: 3000
env:
- name: REACT_APP_API_URL
value: node-backend
11 changes: 11 additions & 0 deletions kuber/frontend-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: test-frontend
spec:
type: NodePort
selector:
app: test-frontend
ports:
- port: 3000
name: http
23 changes: 23 additions & 0 deletions kuber/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: test-task-ingress
spec:
rules:
- host: testtraveltime.com
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: node-backend
port:
number: 8080
- path: /
pathType: Prefix
backend:
service:
name: test-frontend
port:
number: 3000