add manifest k8s

This commit is contained in:
Faizal 2023-01-17 22:32:51 +07:00 committed by marselinowidis
parent ba84c86493
commit ba8629005e
5 changed files with 74 additions and 0 deletions

23
k8s/staging/deployment.yaml Executable file
View File

@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: bukopin-redemption-client-react
namespace: bukopin-staging
spec:
selector:
matchLabels:
app: bukopin-redemption-client-react
replicas: 1
template:
metadata:
labels:
app: bukopin-redemption-client-react
spec:
containers:
- name: bukopin-redemption-client-react
image: registry-harbor.app.bangun-kreatif.com/bukopin/bukopin-redemption-client-react:<VERSION>
ports:
- containerPort: 8080
imagePullSecrets:
- name: regcred

25
k8s/staging/ingress.yaml Executable file
View File

@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: bukopin-redemption-client-react
namespace: bukopin-staging
annotations:
kubernetes.io/ingress.class: "traefik"
cert-manager.io/cluster-issuer: letsencrypt-prod
traefik.ingress.kubernetes.io/router.middlewares: bukopin-staging-redirect-https@kubernetescrd
spec:
rules:
- host: "bukopin-fe.k3s.bangun-kreatif.com"
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: bukopin-redemption-client-react
port:
number: 8080
tls:
- hosts:
- "bukopin-fe.k3s.bangun-kreatif.com"
secretName: bukopin-fe-k3s-bangun-kreatif-com-tls

View File

@ -0,0 +1,9 @@
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: redirect-https
namespace: bukopin-staging
spec:
redirectScheme:
scheme: https
permanent: true

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: bukopin-staging

13
k8s/staging/service.yaml Executable file
View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: bukopin-redemption-client-react
namespace: bukopin-staging
labels:
run: bukopin-redemption-client-react
spec:
ports:
- port: 8080
protocol: TCP
selector:
app: bukopin-redemption-client-react