From e3637d22418989a08636644ed1550f556342d889 Mon Sep 17 00:00:00 2001 From: Sangmin Kim Date: Fri, 5 Apr 2024 17:50:54 +0900 Subject: [PATCH] modified: README.md --- README.md | 41 +++++++++++++++++++++++++++++++++ juiceshop/deployment.yml | 2 +- juiceshop/traefik-ingressR.yaml | 7 ++---- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 45321b5..9e6d95e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,43 @@ # juiceshop +http://origin-juiceshop.akamai-lab.com + +https://origin-juiceshop.akamai-lab.com + +**docker image:** [bkimminish/juice-shop](https://hub.docker.com/r/bkimminich/juice-shop/dockerfile) + +## Prerequisites ## +1. Deploy traefik with [kubernetes IngressRoute provider](https://doc.traefik.io/traefik/providers/kubernetes-crd/). +- [sample yaml files](https://gitea-ptl.akamai-lab.com/akamai/akashop/src/branch/main/traefik) + +2. Get traefik-web external IP. +``` +$ kubectl get services -n default +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +kubernetes ClusterIP 10.128.0.1 443/TCP 24d +traefik-dashboard-service LoadBalancer 10.128.147.145 172.233.168.26 8080:30238/TCP 27h +traefik-web LoadBalancer 10.128.216.128 172.233.169.31 80:32634/TCP,443:31012/TCP 27h +``` + +3. Create a namespace. +``` +$ kubectl create namespace juiceshop +``` + +## Deploy ## +1. Apply yaml files. +``` +$ kubectl apply -f juiceshop/deployment.yml -f juiceshop/service.yml -f juiceshop/traefik-ingressR.yaml +``` + +2. DNS spoofing test. +``` +$ http http://172.233.169.31 Host:origin-juiceshop.akamai-lab.com + +$ http https://172.233.169.31 Host:origin-juiceshop.akamai-lab.com --verify=no +``` + +3. Update DNS record with traefik-web external IP. +``` +origin-juiceshop.akamai-lab.com 172.233.169.31 +``` \ No newline at end of file diff --git a/juiceshop/deployment.yml b/juiceshop/deployment.yml index 36c2174..d787434 100644 --- a/juiceshop/deployment.yml +++ b/juiceshop/deployment.yml @@ -4,7 +4,7 @@ metadata: name: juiceshop namespace: juiceshop spec: - replicas: 1 + replicas: 3 selector: matchLabels: app: juiceshop diff --git a/juiceshop/traefik-ingressR.yaml b/juiceshop/traefik-ingressR.yaml index 0f8a446..10c98ab 100644 --- a/juiceshop/traefik-ingressR.yaml +++ b/juiceshop/traefik-ingressR.yaml @@ -27,8 +27,8 @@ spec: - name: juiceshop port: 3000 - # middlewares: - # - name: juiceshop-redir + middlewares: + - name: juiceshop-redir --- @@ -57,6 +57,3 @@ spec: # name: cookie # secure: true # sameSite: none - # strategy: RoundRobin - # weight: 10 - # nativeLB: true