From 8ddffbb60304010b4b6bd1fbb2fc0fa3d1b8d2b8 Mon Sep 17 00:00:00 2001 From: Quang Pham Date: Sat, 28 Oct 2023 18:43:24 +0200 Subject: [PATCH] add ingress for http --- .github/workflows/deploy.yml | 2 +- eks/ingress-http.yaml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 eks/ingress-http.yaml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b2303de0..ddbd4378 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -49,7 +49,7 @@ jobs: - name: Deploy image to Amazon EKS run: | kubectl apply -f eks/aws-auth.yaml - kubectl apply -f eks/deployment.yaml + kubectl rollout restart -f eks/deployment.yaml kubectl apply -f eks/service.yaml kubectl apply -f eks/issuer.yaml kubectl apply -f eks/ingress.yaml diff --git a/eks/ingress-http.yaml b/eks/ingress-http.yaml new file mode 100644 index 00000000..ed9e688d --- /dev/null +++ b/eks/ingress-http.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: simple-bank-ingress-http + annotations: + cert-manager.io/cluster-issuer: letsencrypt +spec: + ingressClassName: nginx + rules: + - host: "rest.simplebanktest.com" + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: simple-bank-api-service + port: + number: 80 + tls: + - hosts: + - rest.simplebanktest.com + secretName: simple-bank-rest-cert