<1> Travel Demo Tutorial
<2> 네임스페이스 생성
<3> 정리
<1> Travel Demo Tutorial
https://kiali.io/docs/tutorials/travels/
https://kiali.io/docs/tutorials/travels/02-install-travel-demo/
<2> 네임스페이스 생성
1
watch -d kubectl get ns,deploy,svc,pod
2
kubectl create namespace travel-agency
kubectl create namespace travel-portal
kubectl create namespace travel-control
# (옵션) istio 사용 시
kubectl label namespace travel-control istio-injection=enabled
kubectl label namespace travel-agency istio-injection=enabled
kubectl label namespace travel-portal istio-injection=enabled
# 서비스/디플로이먼트 배포
kubectl apply -f <(curl -L https://raw.githubusercontent.com/kiali/demos/master/travels/travel_agency.yaml) -n travel-agency
kubectl apply -f <(curl -L https://raw.githubusercontent.com/kiali/demos/master/travels/travel_portal.yaml) -n travel-portal
kubectl apply -f <(curl -L https://raw.githubusercontent.com/kiali/demos/master/travels/travel_control.yaml) -n travel-control
# 확인
kubectl get deployments -n travel-control
kubectl get deployments -n travel-portal
kubectl get deployments -n travel-agency
# 웹 접속을 위한 NodePort 설정
kubectl patch svc -n travel-control control -p '{"spec":{"type":"NodePort"}}'
# (옵션) kiali 접속해서 istio config 설정 및 삭제 테스트
# (옵션) istio 사용 시 - istio gw,vs 설정
cat <<EOF | kubectl create -f -
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: travel-gateway
namespace: travel-control
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: travel
namespace: travel-control
spec:
hosts:
- "*"
gateways:
- travel-gateway
http:
- route:
- destination:
host: control
port:
number: 8080
EOF
# 삭제
kubectl delete namespace travel-agency
kubectl delete namespace travel-portal
kubectl delete namespace travel-control
<3> 정리
감사합니다.