chore(deploy): use kubernetes to serverside render katbin frontend

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
Amogh Lele 2021-07-08 03:22:46 +05:30
parent 5c9c40aada
commit 9bf7458c04
No known key found for this signature in database
GPG Key ID: ED5C54FBBB920E51
3 changed files with 61 additions and 11 deletions

View File

@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: front-service
spec:
replicas: 1
selector:
matchLabels:
app: front-service
template:
metadata:
labels:
app: front-service
spec:
nodeSelector:
"beta.kubernetes.io/os": linux
containers:
- name: front-service
image: atechnohazard/katbin-web
ports:
- containerPort: 5000
name: front-service
resources:
limits:
cpu: 500m
requests:
cpu: 200m
imagePullPolicy: Always

View File

@ -8,16 +8,27 @@ metadata:
spec:
tls:
- hosts:
- api.katb.in
- api.katb.in
- katb.in
secretName: katbin-tls
rules:
- host: api.katb.in
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: katbin-service
port:
number: 80
- host: api.katb.in
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: katbin-service
port:
number: 80
- host: katb.in
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: front-service
port:
number: 81

View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: front-service
spec:
ports:
- port: 81
targetPort: 5000
selector:
app: front-service