From f685b1a0fd534a5ad935947cbe29251a567e227f Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Fri, 12 Feb 2021 01:13:46 +0530 Subject: [PATCH] feat: deploy frontend Signed-off-by: Ameya Shenoy --- k8s/frontend-deployment.yaml | 26 ++++++++++++++++++++++++++ k8s/frontend-service.yaml | 18 ++++++++++++++++++ k8s/ingress-https.yaml | 27 +++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 k8s/frontend-deployment.yaml create mode 100644 k8s/frontend-service.yaml create mode 100644 k8s/ingress-https.yaml diff --git a/k8s/frontend-deployment.yaml b/k8s/frontend-deployment.yaml new file mode 100644 index 0000000..d6805c7 --- /dev/null +++ b/k8s/frontend-deployment.yaml @@ -0,0 +1,26 @@ +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: bullish-frontend +spec: + selector: + matchLabels: + app: bullish-frontend + replicas: 1 + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + maxSurge: 1 + template: + metadata: + labels: + app: bullish-frontend + spec: + containers: + - name: bullish-frontend + image: codingcoffee/bullish-frontend + +... diff --git a/k8s/frontend-service.yaml b/k8s/frontend-service.yaml new file mode 100644 index 0000000..ebb6eff --- /dev/null +++ b/k8s/frontend-service.yaml @@ -0,0 +1,18 @@ +--- + +apiVersion: v1 +kind: Service +metadata: + name: bullish-frontend + labels: + app: bullish-frontend +spec: + type: ClusterIP + selector: + app: bullish-frontend + ports: + - port: 80 + targetPort: 80 + protocol: TCP + +... diff --git a/k8s/ingress-https.yaml b/k8s/ingress-https.yaml new file mode 100644 index 0000000..3271160 --- /dev/null +++ b/k8s/ingress-https.yaml @@ -0,0 +1,27 @@ +--- + +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: production-https-ingress + namespace: production + annotations: + ingress.kubernetes.io/ssl-redirect: "true" + acme.cert-manager.io/http01-ingress-class: traefik + cert-manager.io/issuer: letsencrypt-production + +spec: + rules: + - host: bullish.codingcoffee.me + http: + paths: + - backend: + serviceName: bullish-frontend + servicePort: 80 + + tls: + - hosts: + - bullish.codingcoffee.me + secretName: production-tls-cert + +...