flowchart LR
subgraph Kubernetes_Cluster [Kubernetes Cluster]
subgraph Video_Service_Namespace [Video Service Namespace]
Video_Streaming_Pod[Video Streaming Pod]
Video_Storage_Pod[Video Storage Pod]
RabbitMQ_Pod[(RabbitMQ Pod)]
History_Pod[History Pod]
Video_Streaming_Pod -->|Microservice Message Flow| Video_Storage_Pod
Video_Streaming_Pod -->|Microservice Message Flow| RabbitMQ_Pod
RabbitMQ_Pod --> History_Pod
end
end
Client[Client] -->|Requests| Video_Streaming_Pod
- pv 생성 (helm/mongo/pv.yaml)
- pvc 생성 (helm/mongo/pvc.yaml)
- helm install mongo bitnami/mongodb -f helm/mongo/values.yaml
kubectl apply -f helm/mongo/pv.yaml
kubectl apply -f helm/mongo/pvc.yaml
helm install mongo bitnami/mongodb -f helm/mongo/values.yaml
troubleshooting
- pv / pvc 만들어줘야함
- bitnami/mongodb docker image 가 arm64 지원 안함 -> mongo 이미지로 변경
- 만들어진 pv / pvc 가 노드의 /mnt/data 에 바인드 되는데, 이때 권한때문에 막힘
- 노드에 직접 접속해서 권한 바꿔주면 됨 (sudo chown -R 1001:1001 /mnt/data/mongo)
- 자꾸 유저 생성 안돼서 집적 mongosh 로 접속해서 유저 생성함... 원인 찾아야함
- helm create apps 로 helm chart 생성
- values.yaml 에 기본 values 설정
- video-streaming.yaml, history.yaml 에 서비스 별 필요한 값 설정
- template/deployment.yaml 에서 env 설정
- helm upgrade --install ./helm/apps -f ./helm/apps/.yaml
- kubectl apply -f helm/rabbitmq/
- helm install rabbitmq bitnami/rabbitmq -f helm/rabbitmq/values.yaml
- helm repo add minio https://charts.min.io/
- helm repo update
- values.yaml 에서 accessKey, secretKey 설정
- storageClass 만들기 (뭔지 잘 모르겠음)
- pv, pvc 생성
- 디렉토리 권한 체크하기
- storageClassName 체크
- helm install video-storage minio/minio -f ./values.yaml
- helm install 로 워크로드 배포 가능
- helm list 로 배포된 워크로드 확인 가능
- helm status 로 워크로드 상세 확인 가능