반응형
intro
istio를 설치 후에 쿠버네티스의 서비스(Service)와 연결하기위해 istio api를 사용하여 Gateway, Virtual Service를 생성해야합니다.
istio 아키텍처
service.yaml
apiVersion: v1
kind: Service
metadata:
labels:
app: web-api
service: web-api
name: web-api
namespace: frontend
spec:
ports:
- port: 80
name: http
protocol: TCP
selector:
app: web-api
gateway.yaml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: web-gateway
namespace: frontend
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "web.kimdragon50.ml"
- port:
number: 443
name: https
protocol: HTTP
hosts:
- "web.kimdragon50.ml"
virtualservice.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: web-virtualservice
namespace: frontend
spec:
gateways:
- web-gateway
hosts:
- "web.kimdragon50.ml"
http:
- match:
- uri:
prefix: /
route:
- destination:
host: web-api
port:
number: 80
반응형
'IT > DevOps' 카테고리의 다른 글
[Devops] Springboot 프로젝트 Docker이미지 만들기(Dockerizing) (0) | 2021.09.10 |
---|---|
[Devops] React 프로젝트 Docker이미지 만들기(Dockerizing) (0) | 2021.09.10 |
[kubernetes] HPA(Horizontal Pod Autoscaler ) 설정 하기 (0) | 2021.09.09 |
[Devops] istio 설치하기 (1.9.2 version) (1) | 2021.09.09 |
[Devops] Argocd 설치하기 (0) | 2021.09.09 |