chore(deploy): use kubernetes to serverside render katbin frontend
Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
parent
5c9c40aada
commit
9bf7458c04
29
deployment/deployment-front.yml
Normal file
29
deployment/deployment-front.yml
Normal 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
|
@ -8,16 +8,27 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- api.katb.in
|
- api.katb.in
|
||||||
|
- katb.in
|
||||||
secretName: katbin-tls
|
secretName: katbin-tls
|
||||||
rules:
|
rules:
|
||||||
- host: api.katb.in
|
- host: api.katb.in
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: katbin-service
|
name: katbin-service
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
|
- host: katb.in
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: front-service
|
||||||
|
port:
|
||||||
|
number: 81
|
||||||
|
10
deployment/service-front.yml
Normal file
10
deployment/service-front.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: front-service
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 81
|
||||||
|
targetPort: 5000
|
||||||
|
selector:
|
||||||
|
app: front-service
|
Loading…
Reference in New Issue
Block a user