chap03는 chap02 위에 Kafka와 Orchestrator가 올라간 구조다.
따라서 실행 절차도 이전 장과 완전히 같지는 않다.
특히 Kafka가 다른 서비스들의 협업 통로이기 때문에, 먼저 준비되어야 한다.

minikube start
minikube image build -t metacoding/db:2 ./db
minikube image build -t metacoding/gateway:2 ./gateway
minikube image build -t metacoding/order:2 ./order
minikube image build -t metacoding/product:2 ./product
minikube image build -t metacoding/user:2 ./user
minikube image build -t metacoding/delivery:2 ./delivery
minikube image build -t metacoding/orchestrator:2 ./orchestrator
kubectl create namespace metacoding
kubectl apply -f k8s/kafka
kubectl wait --for=condition=ready pod -l app=kafka -n metacoding --timeout=120s
이 단계가 중요한 이유는 명확하다.
chap03의 나머지 서비스들은 Kafka를 메시지 통로로 사용하기 때문에, Kafka가 먼저 준비되어 있어야 한다.
kubectl apply -f k8s/db
kubectl apply -f k8s/order
kubectl apply -f k8s/product
kubectl apply -f k8s/user
kubectl apply -f k8s/delivery
kubectl apply -f k8s/gateway
kubectl apply -f k8s/orchestrator
minikube service gateway-service -n metacoding --url
즉, 외부 요청은 여전히 Gateway 진입점을 기준으로 보는 것이 자연스럽다.