cej55 / carsharing

car-sharing msa
0 stars 2 forks source link

Gateway #9

Open cej55 opened 3 years ago

cej55 commented 3 years ago
  1. 게이트웨이(프런트 통합채널 포트) 설정 및 실행 1.1 게이트웨이 통합채널 포트 확인 및 predicates url 추가 : gateway/src/main/resource/application.yml server: port: 8088 # 게이트웨이 포트 확인

spring: profiles: default cloud: gateway: routes:

spring: profiles: docker cloud: gateway: routes:

  1. kubernetes 클러스터에서
    gateway/src/main/resource/application.yml 수정 profile : docker uri : http:///서비스 EXTERNAL IP:PORT 수정 mvn package az acr build --registry hanchyacr --image hanchyacr.azurecr.io/carsharing-gateway:latest --file Dockerfile . kubectl create deploy gateway --image=hanchyacr.azurecr.io/carsharing-gateway:latest -n ns-carsharing kubectl expose deploy gateway --type="LoadBalancer" --port=8080 -n ns-carsharing kubectl get svc -n ns-carsharing kubectl get pod -n ns-carsharing

    curl http://20.84.24.69:8080/reservations

    kubectl delete deploy/gateway -n ns-carsharing kubectl delete service/gateway -n ns-carsharing

    kubectl exec -it pod/gateway-7b785bcbc7-t6w42 -n ns-carsharing /bin/sh kubectl get deploy/gateway -o yaml -n ns-carsharing

    kubectl logs pod/gateway-7b785bcbc7-t6w42 -n ns-carsharing gateway EXTERNAL-IP, 포트 확인 예약 서비스 yaml 수정