neo4j 벡터 db를 쿠버네티스 상에 배포하면서 웹 콘솔에서 DB와 연결이 안되는 문제가 있었습니다.
neo4j의 경우에는 DB connect 진행 시에 Bolt라는 프로토콜을 사용합니다.
nginx ingress controller의 경우에는 http(s) 프록시를 지원하기 때문에
7687 (Bolt) 포트 프록시 설정을 해주어야 합니다.
1. neo4j 콘솔(웹 7474 포트)과 neo4j DB connect(7687)를 위한 ingress를 분리합니다.
2. ingress-nginx namespace에 아래와 같이 configmap을 생성합니다.
namespace와 service는 설정한 이름으로 변경하시길 바랍니다.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-ingress-tcp
namespace: ingress-nginx
data:
"7687": "${namespace}/${service}:7687"
3. nginx ingress arg 설정을 합니다.
아래의 arg를 containers.args에 추가합니다. (헬름 차트 기준 설정)
helm:
releaseName: ingress-nginx
parameters:
- name: controller.extraArgs.tcp-services-configmap
value: rag/nginx-ingress-tcp
이제 DB connect url을 7687 port ingress에 설정한 호스트와 path로 변경하여 DB Connect를 하시면 됩니다.
'troubleshooting' 카테고리의 다른 글
An application on remote computer has requested access to the X server / RDP 공격 (1) | 2024.03.17 |
---|---|
윈도우 서버(wsl2) 접속을 위한 설정 (0) | 2024.03.10 |
ssh 접속이 갑자기 안되는 경우 (REMOTE HOST IDENTIFICATION HAS CHANGED!) (1) | 2024.01.30 |
troubleshooting 게시글에 대해 (0) | 2024.01.30 |